This content has been marked as final. Show 10 replies
Create a button and assign your code to this button.
I tried that I already have a print button but I created another button assigned the code and it still does not work.
What happens? Any error message?
From the LiveCycle Designer documentation:
$host.print( BOOLEAN param1, INTEGER param2, INTEGER param3, BOOLEAN param4,
BOOLEAN param5, BOOLEAN param6, BOOLEAN param7, BOOLEAN param8 )
param1: display print dialog
param2: start page zero based
param3: end page zero based
param4: cancel dialog
param5: shrink to fit
param6: page as image
param7: use param2 and param3 parameters
param8: print annotations
xfa.host.print((1, 1, 2, 0, 1, 0, 1, 0)
param2 and param3 must be strings.
I think I may have stated the problem wrong I need the code to print copies of the first page I am printing. so if the document is 1 page how do i automatically print copies?
You would have to provide a control loop to repeat the print command in LiveCycle Designer or Acrobat.
Right, strings in LiveCycle Designer.
var copies = 2
var bUI = 0
var nStart = "0"
var nEnd = "0"
var bCancelDialog = 0
var bShrinkToFit = 1
var bPrintAsImage = 0
var bPageRange = 1
var bAnnotations = 1
for (i = 0; i < copies; i++)
xfa.host.print(bUI, nStart, nEnd, bCancelDialog, bShrinkToFit, bPrintAsImage, bPageRange, bAnnotations)
use the following code:
xfa.host.print((0, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0)xfa.layout.pageCount(3));