Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Print multiple copies with unique distribution instructions

Avatar

Level 2

Hello,

Is there a Livecycle javascript that can be applied to a PRINT button on a single page that will print multiple copies with each copy having a unique distribution field at the bottom of each page?

For example:

The first copy shows the field "DEALER COPY", followed by the message "Print Dealer Copy?,  then prints after user clicks OK.

The second copy hides "DEALER COPY", then shows the field "CUSTOMER COPY", followed by the message "Print Customer Copy?, then prints after user clicks OK.

I can create this script easily in Acrobat Pro, but not in Livecycle Designer.

Can you help me?

Thanks

Eric

2 Replies

Avatar

Level 10

How does your script for Acrobat looks like?

You generally can also use those scripts in Designer.

Avatar

Level 2

Hi Radzmar,

I misstated the scripting in Acrobat Pro.  In Acrobat Pro, I used the basic Show/Hide, message and print actions for the PRINT button (not a script).

Perhaps if I show you my current script for then click event of the PRINT button in Livecycle, then you can possibly detect the error in my code:

form1.page1.Copy1.presence = "visible";
form1.page1.Copy1.relevant = "+print";

xfa.host.messageBox("Print DEALER COPY?");
xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);


form1.page1.Copy2.presence = "visible";
form1.page1.Copy2.relevant = "+print";

xfa.host.messageBox("Print CUSTOMER COPY?");
xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);

When I test this script, the Copy1 field prints for the first print output, but then both Copy1 & Copy2 fields print on the second print output.  I want to only print the Copy2 field on the second print output. 

Hiding both fields at the end of the print event would also be OK, but if I add hidden presence at the end of the script, then the last print page will fail to include either Copy1 or Copy2 fields.

I hope that this makes sense.

Appreciated,

Eric