I have been searching around about this for a week now. I want to print to Post Script. I want to have the post script file that is printed be the same size as the artboard. I am assuming this means that I can't use a print preset because the print size is hard coded into the preset.
I tried modifying Muppet Mark's code from this post
but it seems theopts.printPreset = 'PostScript';
creates a 8.5X11 page every time.
I've been in the Scripting Reference and P.165 has a printing example, but it just goes to the most recent printer because it's not defined.
I've seen a lot of conversations that say "Don't define the printer, just use a print preset". The group of files I'll be working with will have wildly varying page sizes. At any rate, I have a bit of non-working code that I have been pounding away at but I don't know what it is that I don't know. I've tried to define everything that isn't a default.
Does not work
#target illustrator var idoc = app.activeDocument; function print2folder(){ var options = new PrintOptions(); options.printerName = 'Adobe PostScript File'; options.PPDName = "PPIT 2.2a"; var sepOptions = new PrintColorSeparationOptions(); options.colorSeparationOptions = sepOptions; sepOptions.convertSpotColors = false; sepOptions.overPrintBlack = false; sepOptions.colorSeparationMode = PrintColorSeparationMode.HOSTBASEDSEPARATION; options.jobOptions = jobOpts; var jobOpts = new PrintJobOptions(); var name = idoc.name; var fol = Folder( "/Volumes/PPITX_Hotfolders/Art/Art_No_Trap" );//location on my server I want file to go var psName = name.replace( /.eps$/, '.ps' ); var psPath = fol + '/' + psName; jobOpts.file = new File( psPath ); jobOpts.name = psName; jobOpts.PrintArea = PrintingBounds.ARTBOARDBOUNDS; idoc.print( options ); } print2folder();
Does not work
I'm getting: Error 1238: Required value is missing
Is there an example of a JavaScript that prints to post script by defining the printer and ppd anywhere? Is there a keyword I should be searching for? I've looked at everything that says "PrintOptions" in this forum. I'm missing something.
P.S. What is with the "improvements"? I couldn't edit my code after I pasted it in, it deleted some of the tabbing that I had in for clarity, and it inserted two returns where there is one.
Thanks for your time.