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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Reduce File Size Code
  FAQ FAQ  Forum Search   Register Register  Login Login

Reduce File Size Code

 Post Reply Post Reply
Author
Message
Zudokan View Drop Down
Beginner
Beginner


Joined: 10 Dec 20
Location: USA
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Zudokan Quote  Post ReplyReply Direct Link To This Post Topic: Reduce File Size Code
    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.

Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 10 Dec 20 at 7:38PM
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.


Back to Top
PeterAnderko View Drop Down
Beginner
Beginner


Joined: 03 Dec 20
Location: Slovakia
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote PeterAnderko Quote  Post ReplyReply Direct Link To This Post Posted: 11 Dec 20 at 7:12AM
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
Back to Top
Zudokan View Drop Down
Beginner
Beginner


Joined: 10 Dec 20
Location: USA
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Zudokan Quote  Post ReplyReply Direct Link To This Post Posted: 11 Dec 20 at 4:54PM
Thanks Everyone, problem solved.. appreciate the help.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store