Search code examples
c#pdfasp.net-corebitmiracledocotic.pdf

c# - PdfDocument.GetTextWithFormatting() does not take all pages


I'm trying to open a big PDF file but with this code

using BitMiracle.Docotic.Pdf;

PdfDocument pdf = new PdfDocument("document.pdf")
string document = pdf.GetTextWithFormatting();

the string document take the firsts 87 pages (of 174). Why it takes only the first half of the document?

EDIT: This is an evaluation mode restrictions of the library. There are some alternatives?


Solution

  • The behavior you observe is because of evaluation mode restrictions. When used in trial mode, the library imposes the following restrictions:

    • Documents generated with the library contain an evaluation notice that is printed across each page.
    • For all existing documents only half of the pages get read by the library.

    To evaluate the library without the evaluation mode restrictions you can get a free time-limited license on our site.