I created my first adobe form last week using LiveCycle Designer. I have a print button that I need to print 2 collated copies. I changed the number of copies to 2 in the Form Properties, but there is no option to collate. I found the thread:
I created a .js file and put it in my C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Javascripts folder.
CollateAndPrint = app.trustedFunction( function(oDoc)
{
var iCopies = 3;
var iPages = oDoc.numPages;
app.beginPriv();
var pp = oDoc.getPrintParams();
pp.NumCopies = iCopies;
pp.interactive = pp.constants.interactionLevel.silent;
for ( var i = 0; i < iPages; i++ )
{
pp.firstPage = i;
pp.lastPage = i;
oDoc.print(pp);
}
app.endPriv();
});
I have the print button calling the function using: CollateAndPrint(this);
When I open the form and click the print button, I get the following error:
oDoc.getPrintParams is not a function
How do I fix this?