PDF .NET Library Logo

How to extract text out of an existing PDF document

The code sample extracts the text content of a PDF file. The function allows you to supply the password if the document is password protected.

C# sample:

PDFOperation operation = new PDFOperation("C:\\sample.pdf", "pass");

stringoutputText= operation.ExtractText(0, operation.PagesCount, LayoutType.Physical);

operation.Close();

Back to PDF Code Library