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

Print Multiple copies Problem

vacco
Registered: Feb 14 2007
Posts: 3

Hello,
I am trying to print 6 copies through a interactive form button.
I added the following javascript to the buttons click event:

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

pp.NumCopies = 6;
this.print(pp);

When executed it asks permission, which is ok by me but then only prints one copy.
Any ideas?

Also Too bad the document properties print limits you to 5.

My Product Information:
Acrobat Pro 9.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
It could be that the silent printing is tripping it up. However, the "NumCopies" parameter is new in Acrobat 9 JavaScript. It wouldn't supprise me if it's not properly implemented or there is a documentation error. For example, this parameter starts with a capital "N". Notice that none of the other parameters start with a capital letter. In fact, none of the properties anywhere in the Acrobat JavaScript DOM start with a capital letter. Why this one? I think it's a mistake. Try a lower case "n", i.e. "numCopies".

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

try67
Expert
Registered: Oct 30 2008
Posts: 2398
Weirdly enough, in the reference files it does actually say NumCopies, and there's another property of the PrintParams object with this unconventional form (DuplexType). Both were added in version 8.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

vacco
Registered: Feb 14 2007
Posts: 3
Thanks for your quick replies.

I tried the lower case "numCopies", but that didn't work.

Is there any other way to achieve the same result of 6 copies?
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Yes, make a for loop from 1 to 6 and place the this.print() command in it.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Makankosapo
Registered: Apr 16 2011
Posts: 1
Good day everybody,

Once again, here is yet another person with the same issue.

No offense try67, but writing a loop to invoke the .print() method is not a solution.

Thomp, you seem to be able to offer some assistance in with this matter. Some of the documents we need to print have several hundred pages and are over 100MB in size. A loop to invoke the .print() method sends n times such big files to our printers not only generating unnecessary network traffic, but also delaying other operations.

Have the "NumCopies" implementation been fixed? is there some sort of service pack available?
Here is the code we tried to implement, but did not go as expected:

PP.NumCopies = Copies
PP.flags = PP.constants.flagValues.setPageSize
PP.printerName = RemotePrinters.InUsePrinter.Name
PP.interactive = PP.constants.interactionLevel.silent

jsObj.print(PP)

Any suggestions?

Thank you very much for your time and interest.

Knowledge is the key!