Loading...
Area: Optimizely B2B Commerce

ReadPdf

Recommended reading 

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); 

  }
Do you find this information helpful? Please log in to provide feedback.

Last updated: Jun 01, 2021

Recommended reading