🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18490

Re: Single page PDF export

#18490
From: Richard Ronnback
Date: Sun, 16 Mar 2003 06:02
30 lines
1823 bytes
Here's my attempt:



 
tell application "InDesign 2.0.2"

	-- This section gets the info from the document 
	set myDocument to active document 
	set myName to name of myDocument 
	set myPages to pages of myDocument

	set myFolderPath to (choose folder with prompt "Please select the folder you want to save your PDF pages in") as string 
	set myStyles to name of PDF export styles 
	set myExportStyle to (choose from list myStyles with prompt "Please Choose an Export style") as string

	-- This part is used to get a special character in the file name 
	set mySeparator to "_"

	--This is where things actuaclly are happening 
	repeat with anItem in myPages 
		set myPageNumber to name of anItem as string 
		set MyPDF to myFolderPath & myName & mySeparator & myPageNumber & ".pdf" 
		set page range of PDF export preferences to myPageNumber 
		tell myDocument 
			export format PDF type to MyPDF using myExportStyle without showing options 
		end tell 
	end repeat

end tell
Technical Details
Message-ID: <1de8502b.0@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de8502b.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,48682023eacd1893
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-03-15 22:07:29 PST
From: "Richard Ronnback" <richard.ronnback@telia.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Single page PDF export
Message-ID: <1de8502b.0@WebX.la2eafNXanI>
Date: Sat, 15 Mar 2003 22:02:09 -0800
References: <1de8502b.-1@WebX.la2eafNXanI>
Lines: 34
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit