Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Combining several print jobs

Community Expert ,
Oct 13, 2016 Oct 13, 2016

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;}

    }


Acrobate du PDF, InDesigner et Photoshopographe
TOPICS
Acrobat SDK and JavaScript
667
Translate
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

Community Expert , Oct 13, 2016 Oct 13, 2016

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
Community Expert ,
Oct 13, 2016 Oct 13, 2016

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
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
Community Expert ,
Oct 13, 2016 Oct 13, 2016
LATEST

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).


Acrobate du PDF, InDesigner et Photoshopographe
Translate
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