PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed Jul 03, 2024 5:46 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Jun 28, 2024 11:23 am 
Offline

Joined: Fri Jun 28, 2024 11:17 am
Posts: 2
Hello,
I've a lot of pdf and I need to counter the number of pages of all.
In many case the number of page is good , but sometime I got 1 even if the pdf file have many page.
Here is the code I use to get the number of page
Code:
var pdfDocument = PdfReader.Open(file);
Uint16 NbPage = pdfDocument.Pages.Count;

Is there another solution to get the number of page ?

The file is too big to attach it, I can send it by MP if you need it.

Thanks for your help


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 28, 2024 11:25 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 951
Location: CCAA
I hope you are using PDFsharp 6.1.0.

ffbboy30 wrote:
The file is too big to attach it, I can send it by MP if you need it.
See also:
https://docs.pdfsharp.net/General/Issue-Reporting.html

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 28, 2024 11:48 am 
Offline

Joined: Fri Jun 28, 2024 11:17 am
Posts: 2
If someone have the same problem.
Here is the link to the issue.
Maybe a solution :D

https://github.com/empira/PDFsharp/issues/129


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 32 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group