These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Silent Printing with different number of copies of each page

kota_balaji
Registered: Jul 9 2008
Posts: 4
Answered

How can i print different number of copies of each page in a document in silent print. I made a document with different application forms and reciepts. One application has to be printed twice and other applications has to be printed only once. And reciepts has to be printed thrice. All this has to happen with out user interaction, thats in silent mode. Is there any way to do it.

My Product Information:
Acrobat Standard 8.1.2, Windows
lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
Thom Parker has a suggestion for doing this with the Acrobat Javascript PrintParams object at: http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=3093

Another alternative would be to create a PDF Package separating your PDFs into different files. Then you can set the printing parameters under the File --> Properties (Ctrl + d windows) Advanced tab. This allows you to set the default number of copies to print for each individual PDF.

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.

kota_balaji
Registered: Jul 9 2008
Posts: 4
I am a newbie to iText, can you please provide some examples of making PDF packing.

And the example Thom Parker gave prints whole document for a given number of copies, but I need each page in a document to be print different number of copies like first page to be printed twice and the rest once.
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
What do you mean by silent print, exactly? How is a print job started?

An option is to create a PDF with however many identical pages are needed.

George
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
George,

In this case 'silent print' refers to not showing the print UI dialog and optionally the print progress bar.

Kota,

For the example given you need to provide a series of JavaScript statements to for each range of pages.

// get pirnter parameters and set to silent
var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.silent; // no UI no progress bar

// print page 1 2 times
pp.firstPage = 0; // start at page 1
pp.lastPage = 0; // end at page 1
pp.NumCopies = 2; // 2 copies
this.print(pp); // print page 1

// print all other pages 1 time
// see if more than one page
if (this.numPages > 1) {
pp.firstPage = 1; // start at page 2
pp.lastPage = this.numPages - 1; // end at last page - computed
pp.NumCopies = 1; // 1 copy
this.print(pp); // keep everything the same and print
}

George Kaiser

kota_balaji
Registered: Jul 9 2008
Posts: 4
Thanks very much gkaiseril, your code worked great.