How do I flatten the pdf after I have merged

This Forum is for the use of Clarion For Windows - Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Tracker - Clarion Support, John - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Support Staff, moderators

Post Reply
greenware
User
Posts: 3
Joined: Thu Feb 28, 2013 8:19 pm

How do I flatten the pdf after I have merged

Post by greenware » Thu Feb 28, 2013 8:37 pm

Created a 78 page document merging various pdf's into on document but I want to flatted it and reduce the size.. if I "print it" with Adobe 7 it goes from 25m to 6m how can I do the same thing with pdf-tools SDK?

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: How do I flatten the pdf after I have merged

Post by Tracker - Clarion Support » Thu Feb 28, 2013 8:49 pm

Hi!

The first thing you need to do is to make sure that all the incoming PDF's to the merge are already compressed. This should save you the most space. Note that you cannot adjust the compression during merging, only during generation.

Secondly, when merging you CAN set the Optimizations to remove extraneous material that may be in the incoming PDF's.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Nico - Tracker Supp
User
Posts: 220
Joined: Fri May 18, 2012 8:41 pm

Re: How do I flatten the pdf after I have merged

Post by Nico - Tracker Supp » Thu Feb 28, 2013 9:00 pm

Hi greenware,

Thank you for your post.
Please take a look at the function PXC_SetFlat(), section 2.3.4.35 from PDF-Tools SDK manual.
You can also use PXC_SetCompression() to compress text and images.
For an example about how to use the library, please take a look at PDFXCDemo example
Thanks.

Sincerely,

greenware
User
Posts: 3
Joined: Thu Feb 28, 2013 8:19 pm

Re: How do I flatten the pdf after I have merged

Post by greenware » Thu Feb 28, 2013 9:42 pm

Where is the Documentation? It is not in the download file? and not in the 3.6 documentation?

Nico - Tracker Supp
User
Posts: 220
Joined: Fri May 18, 2012 8:41 pm

Re: How do I flatten the pdf after I have merged

Post by Nico - Tracker Supp » Thu Feb 28, 2013 10:59 pm

Hi greenware,

If you have PDF-Tools 4 SDK the manual is on folder <Root installation folder>\Tracker Software\PDF-Tools 4 SDK\SDKHelp.
If you have PDF-Pro SDK, the manual is on folder <Root installation folder>\Tracker Software\PDF-XChange PRO 5 SDK\SDKHelp
Thanks.

Sincerely,

greenware
User
Posts: 3
Joined: Thu Feb 28, 2013 8:19 pm

Re: How do I flatten the pdf after I have merged

Post by greenware » Thu Feb 28, 2013 11:53 pm

Thank you for your patience... the documentation is not in the Clarion download (?).....

As far as compression goes ... I am using the ComprType_c_auto and not getting much compression... I ran the file through PDF-Tools 4.0 and only got 8% reduction when I optimized... I did not make the PDFs so I guess the setcompression does not help much.. I could not find an example in the Clarion stuff for SetFlat...do I just issue the command when I am looping through the files that I am adding to the resultPDF? or how do I use it?

TIA
Peter Gibson

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: How do I flatten the pdf after I have merged

Post by Tracker - Clarion Support » Fri Mar 01, 2013 1:00 am

SetCompression only works well when creating the original PDF. If the PDF is arriving from another source, you will not be able to easily recompress the existing PDF.

PXC_SetFlat has nothing to do with the kind of flattening you are referring to. "The purpose of the flatness tolerance is to control the precision of curve rendering."
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Post Reply

Return to “PDF-Tools SDK (DLL Libraries Only) - Clarion For Windows Developers Only Please”