🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16282

Re: Script to export to PDF?

#16282
From: Shane_Stanley
Date: Wed, 01 Oct 2003 05:37
23 lines
1597 bytes
On 1/10/03 2:47 PM +1000, Miranda Ball, miranda@mawi.com.au, wrote:

> Is it possible to write a script that will export an ID document to PDF with
> the path and document name of the original document?

Something like this?

tell application "InDesign 2.0.2"
 set theFolder to file path of document 1
 set docNAme to name of document 1
 if docNAme ends with ".indd" then
  set docNAme to text 1 thru -6 of docNAme
 end if
 if length of docNAme > 27 then
  set docNAme to text 1 thru 26 of docNAme & "�"
 end if
 activate
 export document 1 to (theFolder & docNAme & ".pdf") format PDF type with
showing options
end tell

-- 
Shane Stanley,  sstanley@myriad-com.com.au
Technical Details
Message-ID: <BBA0A525.680ED%sstanley@myriad-com.com.au>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer00.lnd.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccd96fc.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,731e1fab0f686b1d
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-09-30 23:08:06 PST
From: Shane_Stanley@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer00.lnd.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: Script to export to PDF?
Message-ID: <BBA0A525.680ED%sstanley@myriad-com.com.au>
Date: Tue, 30 Sep 2003 22:37:10 -0700
References: <2ccd96fc.-1@webx.la2eafNXanI>
Lines: 26
User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.6
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit