Re: Referencing the Print window in InDesign
Re: Referencing the Print window in InDesign
- Subject: Re: Referencing the Print window in InDesign
- From: email@hidden
- Date: Wed, 11 Jul 2007 15:52:53 -0400
I think you'd have better luck manipulating printer presets or printer
preferences, and then printing without the dialog.
For instance:
<applescriptsnippet>
tell application "Adobe InDesign CS2"
if printer preset "ThinPostScript" exists then -- do nothing
else
make new printer preset with properties {name:"ThinPostScript", printer:
postscript file, PPD:"Prinergy Refiner", reverse order:false, print
spreads:false, print master pages:false, sequence:all, print blank pages:
false, print nonprinting:false, paper size:custom, paper height:auto,
paper width:auto, print page orientation:portrait, page position:upper
left, paper gap:0, paper offset:0, paper transverse:false, scale height:
100, scale width:100, scale mode:scale width height, scale proportional:
true, thumbnails:false, tile:false, all printer marks:false, use document
bleed to print:true, bleed marks:false, color bars:false, crop marks:true,
include slug to print:true, mark line weight:p25pt, mark offset:1, mark
type:default, page information marks:true, registration marks:true, color
output:composite leave unchanged, flip:none, send image data:all image
data, font downloading:complete, download PPD fonts:true, data format:
binary, PostScript level:level 3, source space:use document, OPI image
replacement:false, omit bitmaps:true, omit EPS:true, omit PDF:true,
flattener preset name:"2400ppi", ignore spread overrides:false}
end if
end tell
</applescriptsnippet>
makes a printer preset to output thin PostScript.
Or,
<applescriptsnippet>
tell application "Adobe InDesign CS2"
tell active document
if thePSTypeDesired is "ThinPostScript" then
set properties of print preferences to {printer:postscript file, PPD:"
Prinergy Refiner", reverse order:false, print spreads:false, print master
pages:false, sequence:all, print blank pages:false, print nonprinting:
false, paper size:custom, paper height:auto, paper width:auto, print page
orientation:portrait, page position:upper left, paper gap:0, paper offset:
0, paper transverse:false, scale height:100, scale width:100, scale mode:
scale width height, scale proportional:true, thumbnails:false, tile:false,
all printer marks:false, use document bleed to print:true, bleed marks:
false, color bars:false, crop marks:true, include slug to print:true, mark
line weight:p25pt, mark offset:1, mark type:default, page information
marks:true, registration marks:true, color output:composite leave
unchanged, flip:none, send image data:all image data, font downloading:
complete, download PPD fonts:true, data format:binary, PostScript level:
level 3, source space:use document, OPI image replacement:false, omit
bitmaps:true, omit EPS:true, omit PDF:true, flattener preset name:"2400ppi
", ignore spread overrides:false}
end if
end tell
end tell
</applescriptsnippet>
sets the printer preferences to do the same kind of thin PostScript file.
You could easily change the properties to use a specific printer, etc.
This snippet sets the page range, and gives a filename for the PostScript
output, and starts the job
<applescriptsnippet>
tell application "Adobe InDesign CS2"
tell active document
set page range of print preferences to printPageRange
set print file of print preferences to newOutputName
print thisDoc without print dialog
end tell
end tell
</applescriptsnippet>
use any string or integer you would use in the Print dialog for the
variable printPageRange, and an alias or alias-likes string for
newOutputName. There is also an option (can't think of the syntax off the
top of my head) to print using a print preset.
Best Regards,
Bruce Anderson
Electronic Production Manager
McDougal Littell/Houghton Mifflin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden