---
title: ReadPdf utility
slug: configured-commerce/docs/readpdf
docTags: 
createdAt: 2026-08-13T10:46:26.000Z
---

## 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

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