Skip to main content
Known Participant
April 14, 2014
Answered

Scripting the Printing Booklet...

  • April 14, 2014
  • 2 replies
  • 1789 views

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:

  1. Define PrintBooklet Settings (done)
  2. Define PrintPreset Settings (done)
  3. Print using app.activeDocument.printBooklet();

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.

This topic has been closed for replies.
Correct answer Jump_Over

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

2 replies

Community Expert
July 6, 2021

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 )

lfcorullon13651490
Legend
July 6, 2021

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.

Jump_Over
Jump_OverCorrect answer
Legend
April 14, 2014

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

Known Participant
April 14, 2014

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!!

Known Participant
April 14, 2014

I've just tested and it works!

MANY THANKS!!!