Q:
I wrote a quick application to extract pages from 1 pdf file and create
new pdf files with the extracted pages. If I do a simple 13 page
extraction from the original PDF using Acrobat 5.05 the file size is
67K. Using the API doc.save the file size is 200K. This is a
substantial size difference. Is there a way to compress the size down
to be comparable to the size that Acrobat 5.05 produces?
----
A:
How do you copy pages from one document to another?
To keep the file size low, you need to use pdfdoc.ImportPages() before
placing the pages using pdfdoc.PagePushBack() etc.
For more information please see the following resources:
- Copying/Merging Pages: www.pdftron.com/net/usermanual.html#copy_pg
- How do I reduce the file size of a merged PDF document?:
www.pdftron.com/net/faq.html#merge_00
- The last code sample in PDFPage sample project:
www.pdftron.com/net/samplecode.html#PDFPage
Also make sure to specify SDF.Doc.SaveOptions.e_remove_unused or
SDF.Doc.SaveOptions.e_linearized as a hint to Save method. For example:
new_doc.Save("c:/out.pdf", SDF.Doc.SaveOptions.e_remove_unused);