Article View: adobe.scripting.indesign
Article #371Re: JS CS4 Print to postscript
From: Peter Kahrel
Date: Wed, 25 Mar 2009 11:11
Date: Wed, 25 Mar 2009 11:11
30 lines
1873 bytes
1873 bytes
John,
For me this works fine:
myDocument.print(true, app.printerPresets.item("ps"))
Running this line shows the Print then the Print to File dialog, the same that you get when you print from the interface. You can also use this:
myDocument.print(false, app.printerPresets.item("ps"))
Now you get just a small Print to File dialog in which you can enter the name of the file. Maybe give that one a try and see what happens. If you still don't see the dialog you expect, do you see any at all? Could it be that you disabled dialogs using some userInteraction setting? To rule that out, run this one-liner:
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
and try again.
As to the file name you construct for the PS file, there's no point doing that because you can't use it in the script. As far as I can see, you have to enter the file name manually in the dialog. This is unlike exporting to EPS, PDF, etc., where you can say something like "export myDoc to PDF using filename X and preset Y". In other words, you can't say "print myDoc as PS using filename X and preset Y". You have to go through the dialog, and you have to type the name.
Hope this helps.
Peter
Technical Details
Message-ID:
<59b866b7.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b866b7.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,b0efaf9e920b645e X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Peter Kahrel" <kahrel@kahrel.plus.com> Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: JS CS4 Print to postscript Message-ID: <59b866b7.0@webcrossing.la2eafNXanI> Date: Wed, 25 Mar 2009 04:11:32 -0700 References: <59b866b7.-1@webcrossing.la2eafNXanI> Lines: 31 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit