Skip to main content
JR Boulay
Community Expert
Community Expert
Oct 13, 2016 2:04 PM UTC
Answered

Combining several print jobs

Hi experts.

I need to print a PDF document (a contract) : pages 1 to 5 for the client and pages 1 to 2 for the reseller, using a different layer to display some relevant infos.

Regarding client's choices, sometimes I must print page 6 and/or page 7 too (technical sheets).

This cause several print jobs to be sent to the printer, maximum in this case is 4.

Usually this is not an issue, but…

Resellers works for a company where you must insert a personal card in any printer (several on each floor) to get printed sheets.

This cause 2 issues:

- sometimes the user just get the first print job (5 pages on 3 sheets, as the printer's screen said) and forget following sheets… OK, it's a human bug, but it's an issue too since they are wasting time.

- users print accounts increase their number of printing regarding the number of printed jobs (not regarding the number of sheets, but it make sense here): they are penalized.

So my question is:

Can I easily merge several print jobs into one before sending to the printer?

Or must I forgot layers and rethink my process?

Thank you.

Resellers uses Adobe Reader 9 or X (so I cannot use templates).

Here is my script :

// Pages 1, 2, 3, 4, 5 for the customer, displaying the "Client" layer

var ocgArray1 = this.getOCGs();

for (var i=0; i < ocgArray1.length; i++) {

    if (ocgArray1.name == "Client") {ocgArray1.state = true;}

    if (ocgArray1.name == "Agence") {ocgArray1.state = false;}

    }

this.print({bUI: false, bShrinkToFit: true, nStart: 0, nEnd: 4});

// Kit 1 (page 6) : conditional, displaying the same "Client" layer

if (this.getField("KitIP").value != 0) {

    this.print({bUI: false, bShrinkToFit: true, nStart: 6, nEnd: 6});

    }

// Kit 2 (last-page 7) : conditional, displaying the same "Client" layer

if (this.getField("KitLiaison").value != 0) {

    this.print({bUI: false, bShrinkToFit: true, nStart: this.numPages-1});

    }

// Pages 1 & 2 for the reseller, displaying the "Agence" layer

var ocgArray1 = this.getOCGs();

for (var i=0; i < ocgArray1.length; i++) {

    if (ocgArray1.name == "Client") {ocgArray1.state = false;}

    if (ocgArray1.name == "Agence") {ocgArray1.state = true;}

    }

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Oct 13, 2016 2:08 PM UTC

It's possible to print multiple pages in a single print job (using the PrintParams object and the printRange property), but not to show/hide certain OCGs for each page (unless those OCGs only exist on those pages, of course).

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Oct 13, 2016 2:08 PM UTC

It's possible to print multiple pages in a single print job (using the PrintParams object and the printRange property), but not to show/hide certain OCGs for each page (unless those OCGs only exist on those pages, of course).

Translate
JR Boulay
Community Expert
JR BoulayCommunity ExpertAuthor
Community Expert
Oct 13, 2016 4:47 PM UTC

the printRange property

Great!

I was looking for something like that.

Thank you.

Now I must rethink my OCG process… (OCG is on page 1 & 2 only).

Translate
Acrobate du PDF, InDesigner et Photoshopographe