Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Reduce File Size Code |
Post Reply |
Author | |
Zudokan
Beginner Joined: 10 Dec 20 Location: USA Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 10 Dec 20 at 6:22PM |
I am pulling out my hair trying to open the sample file and run
"reduce file size" function. Can someone please post example code of how open file and use reduce file size? I have gone through all the searched threads and there is no complete answer on how to implement this process, just a bunch of discussion of what it won't do, etc. Thanks in advance. |
|
tfrost
Senior Member Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
Post Options
Thanks(0)
|
The best place to start for working samples is the QPDFLibraryDemo program. I see that it does not include a specific sample of the ReduceSize function, but the other scripts in the same Document Management group show how to open, process and save a document. All you need then is to adapt the sample script to include the ReduceSize function. Once you have it working in the scripting which you can see and edit in the demo application, you just need to translate the syntax into whatever programming language you use. And of course add the error handling which tends to be omitted from the sample scripts.
I do not use this function myself, but maybe other users here could help if we knew the programming language you are using.
|
|
PeterAnderko
Beginner Joined: 03 Dec 20 Location: Slovakia Status: Offline Points: 10 |
Post Options
Thanks(0)
|
Hi Zudokan,
I create example in Delphi: procedure TForm1.Button7Click(Sender: TObject); var OKw:Integer; begin PDFDok:=TDebenuPDFLibrary1613.Create; PDFDok.UnlockKey(':-'); PDFDok.LoadFromFile(ExtractFilePath(Application.exeName)+'Test.pdf',''); OKw:=PDFDok.ReduceSize(0); showmessage(inttostr(OKw)); PDFDok.SaveToFile(ExtractFilePath(Application.exeName)+'ReducedForm.PDF'); PDFDok.Free; end; Peter
|
|
Zudokan
Beginner Joined: 10 Dec 20 Location: USA Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Thanks Everyone, problem solved.. appreciate the help.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store