Copy link to clipboard
Copied
Hey there...
I'm trying to help a friend making the automation for some tasks on InDesign.
He want's to print the document as a booklet (he's making books), but seems like he can only print as a PostScript Printer... and then use Distiller to transform it to PDF.
So... first thing first...
I'm trying to:
This works but... asks me where I want to save and what name I want to give to it.
I wanted to automate this completely... because I need to print it twice (the book is composed of 2 booklet printings).
Is it possible to use app.activeDocument.printBooklet(); (or other instruction) and print it wherever I want with the name I want (I would have to make some kind of rule).
I tried app.activeDocument.printBooklet(false); but seems to be "lost in the air".
Can anyone help me? Do you need the whole code or is this enough to understand what I need?
Many thanks for the help.
Hi,
Current printer supposed to be defined as postscript and
use:
app.activeDocument.printBookletPrintPreferences.printFile = File("fullPathToFile.ps");
as many times as you want before calling printBooklet(false, yourPreset)
Jarek
Copy link to clipboard
Copied
Hi,
Current printer supposed to be defined as postscript and
use:
app.activeDocument.printBookletPrintPreferences.printFile = File("fullPathToFile.ps");
as many times as you want before calling printBooklet(false, yourPreset)
Jarek
Copy link to clipboard
Copied
Hmmmmmmm....
That looks good.
I confess I already tried to look into something in that direction, but that property just slipped me... I do have some experience in programming/scripting, but I'm kind of new to this particular environment and some things take a little more time.
I'll have a look at it tonight... and then I'll tell you how it went!!
Thanks a million!!
Copy link to clipboard
Copied
I've just tested and it works!
MANY THANKS!!!
Copy link to clipboard
Copied
A loooong time passed, I know...
But I'm trying to print a booklet to PDF, using javascript.
Almost same situation... but I don't want PS file, I need PDF.
Is this possible?
with (doc.printBookletOptions) {
autoAdjustMargins = true;
bookletType = (dsc) ? BookletTypeOptions.TWO_UP_PERFECT_BOUND : BookletTypeOptions.TWO_UP_SADDLE_STITCH;
pageRange = drange;
printBlankPrinterSpreads = true;
if (dsc) signatureSize = dsign;
}
with (doc.printBookletPrintPreferences) {
activePrinterPreset = dprpres;
printFile = File(dpath + "/" + dname + ".pdf");
}
doc.printBooklet(false , dprpres);
Thanks in advance.
Copy link to clipboard
Copied
I posted a script a few days ago that exports imposed (2-up) documents directly to PDF—there’s no Postscript involved. It does both saddle stitch and signatures for perfect binding. I’ve only tested it in-house, so would be curious if anyone runs into bugs.
The dialog:
https://shared-assets.adobe.com/link/3bfdb004-f188-4f3d-5904-d82dd8f8e2d1
Copy link to clipboard
Copied
Hi lf.corullon,
I think, you always get a PostScript file with printBooklet() .
A possible workflow:
Prepare a hot folder for Acrobat Distiller with dedicated joboptions.
In Distiller menu Settings > Watched folders…
When your PostScript file from printBooklet() is finished writing just move the *.ps file to that hot folder.
FWIW: You can start Acrobat Distiller with ExtendScript.
Use method execute() on the PostScript file ( if suffix *.ps is connected with Acrobat Distiller ).
Or use the same method on the Distiller's exe file ( not tested ).
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Nice, Uwe. That's exactly what I did.
I used the execute() to run Distiller case the exe path I set is valid.
Thank you! Your answer makes me think I am on the right way.