Page 1 of 1

Optimization

Posted: Tue Jan 31, 2012 4:59 pm
by tdonovan
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.

Re: Optimization

Posted: Wed Feb 01, 2012 1:14 am
by John - Tracker Supp
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

Re: Optimization

Posted: Fri May 13, 2016 3:12 pm
by bijuig
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.

Re: Optimization

Posted: Fri May 13, 2016 3:26 pm
by Tracker Supp-Stefan
Hello bijuig,

Is it the PDF Tools SDK that you are after? You can find it here:
https://www.pdf-xchange.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

Re: Optimization

Posted: Fri May 13, 2016 3:38 pm
by bijuig
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?

Re: Optimization

Posted: Fri May 13, 2016 4:25 pm
by Tracker Supp-Stefan
Hello bijuig,

The PXCp_Init method is definitely part of the Tools SDK:
https://help.pdf-xchange.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

Re: Optimization

Posted: Fri May 13, 2016 7:35 pm
by bijuig
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.

Re: Optimization

Posted: Mon May 16, 2016 11:43 am
by John - Tracker Supp
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 ...

Re: Optimization

Posted: Tue May 17, 2016 10:42 am
by bijuig
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.

Re: Optimization

Posted: Tue May 17, 2016 11:24 am
by Tracker Supp-Stefan
Hello bijuig,

Please send us an e-mail with your order number or part of the serial number to support@pdf-xchange.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

Re: Optimization

Posted: Tue May 17, 2016 1:34 pm
by bijuig
I have send you the mail with the license information. Please respond at the earliest.

Re: Optimization

Posted: Tue May 17, 2016 2:27 pm
by Tracker Supp-Stefan
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