Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Scripting the Printing Booklet...

New Here ,
Apr 13, 2014 Apr 13, 2014

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:

  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.

TOPICS
Scripting

Views

596

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Apr 13, 2014 Apr 13, 2014
Hi,Current printer supposed to be defined as postscript anduse:app.activeDocument.printBookletPrintPreferences.printFile = File("fullPathToFile.ps");as many times as you want before calling printBooklet(false, yourPreset)Jarek

Likes

Translate

Translate
Mentor ,
Apr 13, 2014 Apr 13, 2014

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 14, 2014 Apr 14, 2014

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 14, 2014 Apr 14, 2014

Copy link to clipboard

Copied

I've just tested and it works!

MANY THANKS!!!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 02, 2021 Jul 02, 2021

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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 06, 2021 Jul 06, 2021

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:

 

robday_0-1625578055190.png

 

 

 

 

robday_2-1625578055196.png

 

 

 

 

https://shared-assets.adobe.com/link/3bfdb004-f188-4f3d-5904-d82dd8f8e2d1

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 06, 2021 Jul 06, 2021

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 )

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 06, 2021 Jul 06, 2021

Copy link to clipboard

Copied

LATEST

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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines