empira / PDFsharp

PDFsharp and MigraDoc Foundation for .NET 6 and .NET Framework
https://docs.pdfsharp.net/
Other
398 stars 91 forks source link

Wrong page number when reading a simple pdf #129

Open ffbboy30 opened 1 week ago

ffbboy30 commented 1 week ago

Hello, PDFsharp-gdi.zip

The problem is simple the nNbpages is 1 instead of 14

Here is my code from the issue template The code is quite simple var pdfDocument = PdfReader.Open("CE EMR 8029635 - TCE-121190056.pdf"); int NbPages = pdfDocument.Pages.Count; Console.WriteLine(NbPages.ToString());

I put the pdf file in the debug directory

Thanks for your help

ThomasHoevel commented 5 days ago

It would have been much easier if you would have used the template as intended. You sent a ZIP file without code and without .SLN file.

PDFsharp only find 1 page. Further investigation pending.

ffbboy30 commented 5 days ago

Sorry here is the full template Full template.zip

Use the PDFsharp-gdi solution Thanks