Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Printing script does not work

Avatar

Level 2

I put in  script so the form would print all pages, however, when a user clicks the print button, it just prints one page.  What am I doing wrong?

7 Replies

Avatar

Level 10

How does your script look like?

Does it work, when you execute it?

Avatar

Level 2

xfa.host.print(0, "0", "7", 0, 0, 0, 0, 0)..I selected 'click' to execute.  it works, but it doesn't print the 2 pages..only 1.

Avatar

Level 10

Hi,

does your form contain 8 pages?

If you want to print the whole form, change the script into:

xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);

Avatar

Level 2

No..just 2.  Did I read the script wrong?

Avatar

Level 10

Hi,

yes, the second and third parameters set the page range to print (count begins at 0 which means the first page).

The third parameter in your sample is "7", which means the eight page of your dokument, which does not exists.

Avatar

Level 2

I tried it and it still says one page will be printed. I have selected on 'click'.   What else should i look at?

Avatar

Level 10

Can you upload your form somewhere and post a link here, so I can look at it?