HomeGuides
Submit Documentation FeedbackJoin Developer CommunityLog In

ReadPdf

This topic describes how to use the ReadPdf utility to extract and return text from a PDF stored in userfiles.

Description

You can use the ReadPdf utility in cases where customers want to take in a link to a PDF file stored in userfiles (media library) and programmatically extract and return the text from the PDF.

Example

To read the text from a PDF file, you need to modify your customer API controller by adding a method to be called asynchronously with or without a CancellationToken.

Code Sample: ReadPdf

public static async TaskReadPdf(string url)
    
      {
    
        return await PdfGeneratorHelper.ReadPdf(url); 
    
      }

Did this page help you?