Article View: adobe.scripting.indesign
Article #15371Re: AS Indesign: Export documents to PDF
From: Shane_Stanley
Date: Mon, 01 Dec 2003 03:44
Date: Mon, 01 Dec 2003 03:44
38 lines
1870 bytes
1870 bytes
On Dec 1, 2003, at 1:38 PM, Ben Roche wrote: > I have a lot of single page Indesign documents (all different sizes). > I would like to run a script to open them and exports them to a PDF > with their file name and using a PDF style I've setup. Assuming you mean InDesign CS, something like this: on open fileList tell application "InDesign CS" set user interaction level to never interact end tell repeat with aFile in fileList set thePath to (aFile as Unicode text) if thePath ends with ".indd" then set thePath to (text 1 thru -6 of thePath) & ".pdf" else set thePath to thePath & ".pdf" end if tell application "InDesign CS" open aFile export document 1 format PDF type to thePath using PDF export preset "Name of preset" without showing options close document 1 saving no end tell end repeat tell application "InDesign CS" set user interaction level to interact with all end tell beep activate display dialog "Finished." end open Save it as an application, then drag-and-drop your files over it. -- Shane Stanley <sstanley@myriad-com.com.au>
Technical Details
Message-ID:
<B0FF72B0-23B0-11D8-9C8C-003065D61B90@myriad-com.com.au>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2cceaa25.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,5b18b76b3427bd7c X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-11-30 20:07:44 PST From: Shane_Stanley@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: AS Indesign: Export documents to PDF Message-ID: <B0FF72B0-23B0-11D8-9C8C-003065D61B90@myriad-com.com.au> Date: Sun, 30 Nov 2003 19:44:39 -0800 References: <2cceaa25.-1@webx.la2eafNXanI> Lines: 41 X-Mailer: Apple Mail (2.606) MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit