PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 6:33 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Jul 20, 2009 4:59 am 
Offline

Joined: Mon Jul 20, 2009 4:37 am
Posts: 1
From my limiting reading on the structure of PDF the number of pages in a document is not kept in a single field( I could be wrong).
If the number of pages is not in a single field those PDF Sharp contain a function similar to Foxit PDF Editor called optimize which removes unneed information from the pdf.

Someback ground information may shed some light on my question. I currently have an application which converts a printed document in to a pdf using a scanner and ocr software. The program will also split the pdf into a smaller pdf based on certain business rules. For example a ten page pdf maybe split into five two page files. Currently they way I determine the number of pages in the new split files those not work correctly, however if I manually run Foxit PDF Editor and goto Edit > Optimize and then rerun my program I get the correct information.

So my questions are is there a way to determine the number of pages in a file using PDF metadata and number of pages field. If not does PDF Sharp have a method which removes/corrects the pdf info.

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 20, 2009 9:17 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
You can try it yourself. Just create a Release build of PdfSharp.Explorer and open the document with it.
PdfSharp.Explorer creates a new file with an underscore appended to the filename (test_.pdf for test.pdf).

Open this file and check if the pagenumber is corrected.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 373 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