Optimization

This Forum is for the use of 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 or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan

Post Reply
tdonovan
User
Posts: 61
Joined: Tue Jun 12, 2007 9:21 pm

Optimization

Post by tdonovan » Tue Jan 31, 2012 4:59 pm

I am creating a PDF by insertpagesto and then want to run optimization, but optimization doesn't accomplish anything. If I take the same PDF file and run the PDF-Tools program itself (your program) to the same document it cuts the file size by more than half. Is there a way thru code to perform the same optimization as the PDF-Tools program.

Here is effectively what I am doing, which I think matches what I do in the command line tool.

Dim pdf As Integer
res = PDFToolsLib.PXCp_Init(pdf, PDFToolsLib.g_RegKey, PDFToolsLib.g_DevCode)
res = PDFToolsLib.PXCp_ReadDocumentW(pdf, Filename, 0)
res = PDFToolsLib.PXCp_SetSpecVersion(pdf, PDFToolsLib.PXC_SpecVersion.SpecVersion16)
res = PDFToolsLib.PXCp_OptimizeFonts(pdf, 0)
res = PDFToolsLib.PXCp_OptimizeRemoveNamedDests(pdf)
res = PDFToolsLib.PXCp_OptimizeStreamCompression(pdf)
res = PDFToolsLib.PXCp_WriteDocumentW(pdf, Filename, PDFToolsLib.PXCp_CreationDisposition.PXCp_CreationDisposition_Overwrite, _
CType(PDFToolsLib.PXCp_WriteDocFlag.PXCp_Write_Release, Integer))

Thanks for the help.

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Re: Optimization

Post by John - Tracker Supp » Wed Feb 01, 2012 1:14 am

Hi any chance you could upload a before and after file so we can compare the content and advise - please also include the PDF-Tools end user app (generated PDF) file and your full code so that we have the 'good the bad and the ugly' ;-)

please zip any files posted.

thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

bijuig
User
Posts: 5
Joined: Thu May 12, 2016 2:19 pm

Re: Optimization

Post by bijuig » Fri May 13, 2016 3:12 pm

From where can i get the object PDFToolsLib? I have downloaded PDF xchange editor, viewer, tools sdk, but i am not getting the reference from any of the components. Please help me, it is very urgent. We have a production deployment coming soon. We have licensed version of PDFXchange.

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13428
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Optimization

Post by Tracker Supp-Stefan » Fri May 13, 2016 3:26 pm

Hello bijuig,

Is it the PDF Tools SDK that you are after? You can find it here:
https://www.tracker-software.com/product/pdf-tools-sdk
But please note that it has been replaced by the Core API, and as such the above link is now found on the "Discontinued Products" download page.

Regards,
Stefan

bijuig
User
Posts: 5
Joined: Thu May 12, 2016 2:19 pm

Re: Optimization

Post by bijuig » Fri May 13, 2016 3:38 pm

This is the same SDK and Core API I have downloaded and installed. But it does not have PDFToolsLib. Can you please help me? Or some other class has this PXCp_Init?

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13428
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Optimization

Post by Tracker Supp-Stefan » Fri May 13, 2016 4:25 pm

Hello bijuig,

The PXCp_Init method is definitely part of the Tools SDK:
http://help.tracker-software.com/DEV/de ... :pxcp_init
Please do check the sample projects provided with the Tools SDK and you should see how to use that method. I just checked my link - it is the correct one pointing to the Tools SDK page.

Regards,
Stefan

bijuig
User
Posts: 5
Joined: Thu May 12, 2016 2:19 pm

Re: Optimization

Post by bijuig » Fri May 13, 2016 7:35 pm

Thanks Stefan. Your suggestion and referring to the sample code, I made our code work. But now the problem is, it is showing we have used evaluation version. But we have a valid license for PDF printer. Does that not apply for PDF SDK or Core API? If it applies, please let me know what should i do to remove the watermark.

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Re: Optimization

Post by John - Tracker Supp » Mon May 16, 2016 11:43 am

Hi,

You must have a PDF-XChange Drivers API SDK or a PDF-XChange PRO SDK license to use our printer drivers - if that is what you are referring to ?

If not please explain further ...
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

bijuig
User
Posts: 5
Joined: Thu May 12, 2016 2:19 pm

Re: Optimization

Post by bijuig » Tue May 17, 2016 10:42 am

Yes, we have PDF XChange Drivers API SDK license. Can we use the same license for handling Core API SDK or PDF Tools SDK? Please confirm.

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13428
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Optimization

Post by Tracker Supp-Stefan » Tue May 17, 2016 11:24 am

Hello bijuig,

Please send us an e-mail with your order number or part of the serial number to support@tracker-software.com and we will be able to advise if the key is good for the Tools SDK as well. If not - you might need to upgrade your Drivers API license to a Pro SDK one - to get access to the Tools and Core APIs. We will be able to advise once we see the license.

There are public forums so please do not post any license info here!

Regards,
Stefan

bijuig
User
Posts: 5
Joined: Thu May 12, 2016 2:19 pm

Re: Optimization

Post by bijuig » Tue May 17, 2016 1:34 pm

I have send you the mail with the license information. Please respond at the earliest.

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13428
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Optimization

Post by Tracker Supp-Stefan » Tue May 17, 2016 2:27 pm

Thanks bijuig,

Replied to your e-mail. We can continue the license discussion there, as I believe e-mails are more suited for that license discussion.

Regards,
Stefan

Post Reply