Thread View: adobe.scripting.indesign
5 messages
5 total messages
Started by sph3rex
Thu, 12 Feb 2009 13:12
Printing separations with applescript
Author: sph3rex
Date: Thu, 12 Feb 2009 13:12
Date: Thu, 12 Feb 2009 13:12
41 lines
2278 bytes
2278 bytes
Hello, i have a lil bit of a problem with the following script so if someone just drop a hint i would appreciate it: Platform: MacOsX Leopard 10.4.11 Indesign CS 2.0 The values defined are: thedoc = document 1 of the Indesign Application pPages = a single number (e.g.: 2) presetUsed = string, name of the preset(in this case a preset with output set to separations and application built-in trapping) pcolors = string of colors to be printed in csv form, eg: Pantone XXX,Process Black ... etc. tell print preferences of theDoc set page range of print preferences of theDoc to pPages set (active printer preset) to presetUsed set profile to "Generic CMYK Profile" set bleed bottom to 10 set bleed top to 10 set bleed inside to 10 set bleed outside to 10 set mark offset to 0 set (print ink of every ink of theDoc) to false set AppleScript's text item delimiters to "," if length of text items of pColors > 1 then set tItems to (text items of pColors) repeat with vC in tItems set (print ink of ink vC of theDoc) to true end repeat else set (print ink of ink pColors of theDoc) to true end if end tell tell theDoc print without print dialog end tell Now the problem: the problem is that when printing with the "print without print dialog" option, the program just prints all the plates ignoring the settings in the print preferences declaration. This is not the same when the "print with print dialog" option is used. When using that option everything seems to be fine. However i need to work it out without using the print dialog. Any help regarding this issue is highly appreciated. Thanks in advance and wish ya a wonderful day.
Re: Printing separations with applescript
Author: Kasyan_Servetsky
Date: Thu, 12 Feb 2009 14:42
Date: Thu, 12 Feb 2009 14:42
12 lines
1123 bytes
1123 bytes
Hi Bogdan, I don't have CS version, so I can't check your script. But I recomend you to save all print settings in a print preset and set it as active printer preset in your script. Another property you may need to set is page range, for example if you need to print each plate to a separate file/sheet. Kasyan tell application "Adobe InDesign CS3" set myPrintPrefs to print preferences of active document set active printer preset of myPrintPrefs to "Your preset name" end tell
Re: Printing separations with applescript
Author: sph3rex
Date: Thu, 12 Feb 2009 20:30
Date: Thu, 12 Feb 2009 20:30
5 lines
1482 bytes
1482 bytes
Thanks for your reply Kasyan. I really appreciate it. However the script i'm trying to work out is doing exactly the things that you've mentioned (having a printer preset that is set as the active printer preset) except that my script is modifying a few settings of that preset(that's because i need a lot of custom printing, and having a separate preset for each one would make me create a dozen presets). However the thing that i dun really get is why this works when using the print display dialog, and why it doesn't work without the print dialog. The thing that i really dun seem to understand ... why if i add after the "tell preferences" end tell the line: set numberOfActiveInks to (every ink of theDoc whose print ink is true) display dialog ((length of numberOfActiveInks) as string) will show the "correct" number of inks i want to be printed, but when it goes printing them it just prints them all.
Re: Printing separations with applescript
Author: Shane_Stanley
Date: Thu, 12 Feb 2009 22:29
Date: Thu, 12 Feb 2009 22:29
12 lines
1671 bytes
1671 bytes
On 13/2/09 12:12 AM, "bogdan cosmin" <member@adobeforums.com> wrote: > the program just prints all the plates ignoring the settings in the print > preferences declaration Why are treating inks as if they belong to print preferences? They actually belong to the document; try addressing them outside your "tell print preferences" block. -- Shane Stanley <sstanley@myriad-com.com.au> AppleScript Pro Florida, April 2009 <http://scriptingmatters.com/aspro>
Re: Printing separations with applescript
Author: sph3rex
Date: Fri, 13 Feb 2009 07:19
Date: Fri, 13 Feb 2009 07:19
4 lines
1000 bytes
1000 bytes
Thanks Shane for your response and suggestion. I tried moving the ink declaration out of the tell statement, but seems like this doesn't fix the problem. Again if i get the number of active inks just before the print statement, it shows the "correct" number of them but when printing them, it simply ignores settings and just prints all plates. Thanks again both of you, Kasyan and Shane, for your time, patience and suggestions.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads