🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16315

Re: [AS] Printing seperate PS files for every file in a Book?

#16315
From: Kari Puikkonen
Date: Wed, 24 Sep 2003 14:40
60 lines
2511 bytes
Shane, thanks!

      full name of book contents of book 1




Hehe, yes of course.

But I�m beginning to think that InDesign doesn�t like printing book file through AppleScript�

This one crashes InDesign at this line: set active printer style of print preferences of book 1 to "PDF PS"



tell application "InDesign 2.0.2" 
	activate 
	tell book 1 
		set theDocs to full name of book contents of book 1 
		repeat with i from 1 to count of theDocs 
			set myName to (name of book 1) & "_" 
			set myFolderPath to (choose folder with prompt "Please select the folder you want to save your PDF pages in") as string 
			tell print preferences 
				set active printer style to "PDF PS" 
				set print file to targetFolder & myName & i & ".ps" 
				set printer to postscript file 
			end tell 
			print without print dialog 
		end repeat 
	end tell 
end tell



And this one crashes InDesign at this line: set print file to myPSPathAndName



tell application "InDesign 2.0.2" 
	set myBook to book 1 
	set myFolder to (choose folder with prompt "Please select the folder you want to save your PS pages in") as string 
	set myFileName to name of myBook 
	tell myBook 
		set theDocs to full name of book contents of book 1 
		repeat with myBCCounter from 1 to count of theDocs 
			set myPSPathAndName to myFolder & myFileName & "_" & myBCCounter & ".ps" 
			tell print preferences 
				set myBCname to myBCCounter as string 
				set print file to myPSPathAndName 
			end tell 
			print myBCname without print dialog 
		end repeat 
	end tell 
end tell



�does anybody know if this is; something that can�t be done or bug or is there something missing from my examples?

Kari the Frustrated Man
Technical Details
Message-ID: <2ccd801e.4@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccd801e.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,a374fc5f1304c8e8
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-09-24 08:07:54 PST
From: "Kari Puikkonen" <kari.puikkonen@welho.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: [AS] Printing seperate PS files for every file in a Book?
Message-ID: <2ccd801e.4@webx.la2eafNXanI>
Date: Wed, 24 Sep 2003 07:40:09 -0700
References: <2ccd801e.-1@webx.la2eafNXanI>
Lines: 56
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit