GEOSoft Posted July 26, 2007 Posted July 26, 2007 If I write slower, I prefer $pdftk ;-)Thanks, ReinhardI do it myself too. Funny how you can spot that in someone elses code but spend hours debugging your own because of it. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
ConstantineGeorgantzas Posted July 27, 2007 Author Posted July 27, 2007 "You may have to look in the registry to see if there is a verb for the compress function."There is no such a verb and also Acrobat actice x (DLL) and Adobe-JS don't support it on a easy way, because compression is normaly done direct from the PDF print driver.With the freeware command line tool PDFTk. exe you can compress PDFs easy. That's a well known and easy to handle command-line tool, so don't be afraid to downlod and use it. I tested the compression and it gave me better results as Adobe Acrobat.http://www.pdfhacks.com/pdftk/To work with that tool, based on that what was tooled before, you may do followingDIM $pdft = C:\.......\PDFtk.exe ;full path to pdftkthen use something like thisRun(@ComSpec & " /c " &$pdftk&" "&$fileNameIN &" output " &$fileNameOut &" compress","",@SW_HIDE,$STDERR_CHILD + $STDOUT_CHILD)Where $fileNameIn is the variable for the Input PDF; $fileNameOut that one for the output PDF. Both names can also be the same.Good luck, ReinhardWhen I first read your post I found it to be too much for me, but now as I have read it over and over again the approach your outline has become clearer and more appealing. I am trying to attack my assignment with various other approaches and have made progress along those avenues. However, I will keep your ideas in mind and even if I finish my program without shining the light on them which you have provided I promise to go back and entertain them in time.
ssubirias3 Posted August 5, 2007 Posted August 5, 2007 With the freeware command line tool PDFTk. exe you can compress PDFs easy. That's a well known and easy to handle command-line tool, so don't be afraid to downlod and use it. I tested the compression and it gave me better results as Adobe Acrobat.http://www.pdfhacks.com/pdftk/I love reading and searching the forums for answers to my questions and BAM... discovering a cool freeware program or site I didn't know existed. Thanks for the link and suggestion! Yes I know, I'm easily amused.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now