This content has been marked as final. Show 10 replies
Which scripting language are you using? What statement are you using to generate the PDF?
Scripting is totally Greek to me so I don't know what scripting language I'm using.
If it helps, I'm working on a Mac, system OS X (10.4.11) and I'm using Script Editor to make the script, InDesign CS2 (soon to go to CS4) and Acrobat 7.0 Professional.
About a year ago I found a script somewhere online that I was able to modify by trial and error to suit our purposes. We needed to check the pdf files that were generated, before we closed them, so that worked fine. Now I'm using the same script to generate more pdfs that we don't need to view. Everyone would like it better if they didn't have to be always closing pdf files.
As to what statement I'm using to generate the pdf, is this what you mean:
"export this_image format PDF type to target_path using "150lpi" without showing options"
You're using AppleScript. Could it be that your 150lpi preset has View PDF after exporting activated?
Open Indesign, export a pdf manually and check off "View PDF after Exporting" dn use your script
Thanks for the replies.
The only problem is that we make pdfs for different purposes. Most have different requirements so we've defined different presets, and we export from InDesign with Viewing turned on. If you turn on View PDF after Exporting once, it stays on until you turn it off again. You can't choose that option when you define a PDF Preset.
We may have to make a pdf that we need to view and the next one we don't need to view and so on. (Unfortunately because of the work flow we can't make all one kind of pdf and then all another kind). If we turn viewing on for one pdf, then it stays on for the next one.
A script for the ones we don't need to view would speed things up quite a bit. We would just drag the file to a folder that has an action script applied to it and let it do its thing.
Isn't there a way to add a line to my script to close the pdf file?????
In AppleScript you can probably tell Acrobat to close the document, but it's been a long time for me...
This is the last part of my script:
tell application "Adobe InDesign CS2"
set this_image to open file (source_file as string)
export this_image format PDF type to target_path using "150lpi" without showing options
close this_image saving no
tell application "Adobe Acrobat 7.0 Professional"
I've tried different words and phrases to get the pdf to close, but as I don't know the lingo nothing is working for me.
No Acrobat Pro on this Mac. With my Acrobat Reader the following scripts translate but fail to execute. This might be just a Acrobat Reader problem, so try them anyway:
tell application "Adobe Acrobat 7.0 Professional" to close document 1
tell application "Adobe Acrobat 7.0 Professional" to close all docs
Stronger measures - should always work:
tell application "Adobe Acrobat 7.0 Professional" to quit
tell application "Adobe Acrobat 7.0 Professional" to quit saving no
Telling Acrobat to 'close document 1' or 'close all docs' both work great.
Thanks for your help.
On 27/3/09 3:21 AM, "Barbara Wentzel" <email@example.com> wrote:<br /><br />> Telling Acrobat to 'close document 1' or 'close all docs' both work great.<br /><br />Just be aware that Acrobat regards the first document opened as document 1,<br />not the frontmost. So either use close all docs, or specify the troublesome<br />doc by name.<br /><br />-- <br />Shane Stanley <firstname.lastname@example.org><br />AppleScript Pro Sessions <a href=http://scriptingmatters.com/aspro>