🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #15781

Re: applescript for creating Single Page PS files

#15781
From: Shane_Stanley
Date: Fri, 14 Nov 2003 21:14
31 lines
1893 bytes
The main problem is that one of the properties of a printer style is 
the path to where you want the PS file saved. Because that has to 
change with every page (and document), you can't use printer styles 
directly. Also, the target of the print command is the document, not 
path.

So what you need to do is get the properties of the chosen printer 
style, then set the properties of the print preference of the document 
to them. Then each time through the loop you modify the print file 
property of the print preferences accordingly.

Something like this (untested):

...
	set mySeparator to "_"
	set theProps to properties of printer style myPrinterStyle
	set properties of print preferences of myDocument to theProps
	repeat with anItem in myPages
		set myPageNumber to name of anItem as string
		set MyFile to myFolderPath & myName & mySeparator & myPageNumber & 
".ps"
		set myPages to myPageNumber
		tell myDocument
			set print file of print preferences to MyFile
			print without print dialog
		end tell
	end repeat
end tell

--
Shane Stanley <sstanley@myriad-com.com.au>
Technical Details
Message-ID: <82CCAE09-16E7-11D8-8BFB-003065D61B90@myriad-com.com.au>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2cce65e8.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,25854f36698e198a
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-11-14 13:37:54 PST
From: Shane_Stanley@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: applescript for creating Single Page PS files
Message-ID: <82CCAE09-16E7-11D8-8BFB-003065D61B90@myriad-com.com.au>
Date: Fri, 14 Nov 2003 13:14:19 -0800
References: <2cce65e8.-1@webx.la2eafNXanI>
Lines: 32
X-Mailer: Apple Mail (2.606)
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit