PDFsharp & MigraDoc Foundation http://forum.pdfsharp.de/ |
|
Optimize/Compress Meta Information-Determine number of pages http://forum.pdfsharp.de/viewtopic.php?f=2&t=793 |
Page 1 of 1 |
Author: | gearbolt [ Mon Jul 20, 2009 4:59 am ] |
Post subject: | Optimize/Compress Meta Information-Determine number of pages |
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 |
Author: | Thomas Hoevel [ Mon Jul 20, 2009 9:17 am ] |
Post subject: | Re: Optimize/Compress Meta Information-Determine number of pages |
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. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |