G’day all
Futher to this saga, I posted on a _javascript_ forum for help with this Applescript that calls a _javascript_ code.
I’ve received nothing but criticism, so I’m going to post it here as well, in the hope that one of you folk might know the answer. I’m stiil wanting to try saving the trimmed individual page, even as a PDF, and see if the re-opened file saves as a trimmed copy. I’ve lost interest in saving as a TIFF, the GUI does that fine, but would like to try PDF’s. It’s the last line that eludes me, and seems to have been overlooked by replies, mainly critical of my using Applescript.
Just rying to speed my beast up a tad.
Regards
Santa
POST
I have been saving single pages of PDF's using the GUI, but it would be much faster to use Java.
I can't work out how to set the save path, and I also need error trap any failed TIFFS, and save as JPEG's instead. Acrobat won't save TIFFS larger than the international size. Also need to increment each file name to match the page number, please.
So far, I've got...
set tAT to POSIX path of ((path to desktop as text) & "Temporary Acrobat TIFFS") tell application "Adobe Acrobat" activate tell document 1 set theTempName to name of document 1 set Params to "" set Params to Params & "var dEnd = (this.numPages-1);" & return as text set Params to Params & "this.extractPages(0,dEnd);" & return as text set Params to Params & "var cFlName = this.documentFileName ;" & return as text set Params to Params & "save to : ((path to desktop as text) + \"Temporary Acrobat TIFFS\" + \":\"+ cFlName) using: \".tiff\";" & return --< this fails, correct format needed. #set Params to Params & "var this.closeDoc(false);" as text
do script Params end tell end tell
G’day Shane, and newcomer Bob.
Bob, I’ve had a quick read, and I think I’d still be in the same dilemma.
Shane, thanks for the warning. I’ve put together this testing code, and while it initially trims, when it adds text boxes it displays extra text at bottom, as it defaults size to A4 paper, it seems. It does, however, keep the file open during the whole process.
I’d like to try and save the trimmed file, BY THE PAGE, then re-open, expand, and barcode, to see if it does the same as the Tiffs. Otherwise I think I’m chasing a dead duck. The GUI is very slow, but IS reliable. My directive to increase speed may have to be forgotten this time. Hate giving up. Saving by the Page while Acrobat is open is my dilemma. I think the Tiffs I save at must be high resolution. I haven’t checked. When I go back to an old version, I’ll do a 'get info', and let you know.
Regards
Santa
PS. I’ve tried attaching a compressed script, but it’s too big. If anyone want to try it out, with the file as well, please let me know off list.
|