Skip to main content
Known Participant
February 15, 2018
Answered

Print specific pages and quantities

  • February 15, 2018
  • 1 reply
  • 1528 views

How would I print (ID6) specific pages and quantities using a script -- for example, using all current parameters, to print 1 copy of page 1 and 2 copies of page 2?

The following on its own (even if not elegant) works to do what I wish:

app.activeDocument.printPreferences.pageRange = "1"

app.activeDocument.print (false) ;

app.activeDocument.printPreferences.pageRange = "2"

app.activeDocument.print (false) ;

app.activeDocument.printPreferences.pageRange = "2"

app.activeDocument.print (false) ;

But as opposed to printing page 2 twice with one command line for each of the two copies (takes longer), how do I do it with one command line by specifying two copies?

Thanks for your help.

This topic has been closed for replies.
Correct answer Laubender

Hi, just tested the link and it works ok.

Regards,
Uwe


FWIW The code you are looking for is:

app.activeDocument.printPreferences.copies = 2 // Your number of copies.

You may download Jongware's excellent ExtendScript DOM documentation for InDesign CS6 and below here:

Indesign JavaScript Help

Or you can see into Gregor Fellenz' compiled one here:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#about.html

Regards,
Uwe

1 reply

Community Expert
February 16, 2018

Hi NYJack  ,

you'll find everything you need for printing documented here:

Adobe InDesign CS6 (8.0) Object Model JS: PrintPreference

Obviously you are looking for property copies

Regards,
Uwe

NYJackAuthor
Known Participant
February 19, 2018

Hi Uwe,

Regrettably, the link for copies comes up blank:

Not Found

The requested URL /idcs6js/pc_number.html was not found on this server.

Community Expert
February 19, 2018

Hi, just tested the link and it works ok.

Regards,
Uwe