🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
10 messages
10 total messages Started by Barbara_Wentzel Wed, 25 Mar 2009 18:22
Script to use to close pdf file
#304
Author: Barbara_Wentzel
Date: Wed, 25 Mar 2009 18:22
7 lines
989 bytes
Could someone tell me the wording to use in a script that will close a pdf file?

The script I'm using will open an InDesign CS2 file (when dragged into a folder that has the action script applied to it), generate a pdf and then close the InDesign file. I don't know how to tell the script to close the pdf file.

I don't need to see the pdf file at all, so maybe there's a way to generate the pdf without it ever opening???

Thanks for any help.
Re: Script to use to close pdf file
#306
Author: Dave_Saunders
Date: Wed, 25 Mar 2009 18:40
3 lines
731 bytes
Which scripting language are you using? What statement are you using to generate the PDF?

Dave
Re: Script to use to close pdf file
#308
Author: Barbara_Wentzel
Date: Wed, 25 Mar 2009 19:14
9 lines
1410 bytes
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"

Barb
Re: Script to use to close pdf file
#311
Author: Dave_Saunders
Date: Wed, 25 Mar 2009 20:25
3 lines
722 bytes
You're using AppleScript. Could it be that your 150lpi preset has View PDF after exporting activated?

Dave
Re: Script to use to close pdf file
#323
Author: Baljeetsingh
Date: Thu, 26 Mar 2009 09:22
3 lines
687 bytes
Open Indesign, export a pdf manually and check off "View PDF after Exporting" dn use your script

Shonky
Re: Script to use to close pdf file
#329
Author: Barbara_Wentzel
Date: Thu, 26 Mar 2009 12:34
10 lines
1511 bytes
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?????

Barb
Re: Script to use to close pdf file
#331
Author: Dave_Saunders
Date: Thu, 26 Mar 2009 13:01
3 lines
693 bytes
In AppleScript you can probably tell Acrobat to close the document, but it's been a long time for me...

Dave
Re: Script to use to close pdf file
#337
Author: Barbara_Wentzel
Date: Thu, 26 Mar 2009 13:54
13 lines
1088 bytes
This is the last part of my script:

tell application "Adobe InDesign CS2"
				launch
				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"
					activate

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.

Barb
Re: Script to use to close pdf file
#341
Author: Dirk_Becker
Date: Thu, 26 Mar 2009 15:57
10 lines
1070 bytes
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

Dirk
Re: Script to use to close pdf file
#342
Author: Barbara_Wentzel
Date: Thu, 26 Mar 2009 16:21
7 lines
699 bytes
Dirk

Telling Acrobat to 'close document 1' or 'close all docs' both work great.

Thanks for your help.

Barb
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads