Can I have a message box pop up at pre-print Livecycle Designer

Avatar

Avatar

akgrimes

Avatar

akgrimes

akgrimes

18-04-2017

I don't have a "print" button programmed on my form.

We want users to save it (I do have "save" buttons) and forward the interactive PDF to others who have sections to complete via email. I have users who, despite education, help links, a general pop up window they can click on for instructions, etc., are printing the form, completing it by hand, scanning it as a new static PDF, and forwarding it -- thus eradicating the interactive commands.

Is there a way to program a message box to pop up when a user tries to print the form, warning about how that action impacts future steps on the process?

I tried a PrePrint event on the master page:

xfa.host.messageBox("This is my message. ", "Do not print", 3);

but that didn't work.

I've searched online for answers, but what I can find all links back to requiring mandatory fields to be completed before a form can be printed. Our form won't necessarily be completed at the point someone wants to print it -- it has several steps before all the fields will be completed. Requiring all mandatory fields be completed before printing won't achieve what I need.

Can this be done?

Accepted Solutions (0)

Answers (7)

Answers (7)

Avatar

Avatar

Magus069

MVP

Avatar

Magus069

MVP

Magus069
MVP

21-04-2017

Hi there,

don't forget the capital letter 'B' of box when calling the method messageBox() like the following :

Avatar

Avatar

akgrimes

Avatar

akgrimes

akgrimes

20-04-2017

Thank you, thank you, thank you PDFGuru. Not sure how I had messed up the script, but I so appreciate your help fixing it.

Avatar

Avatar

PDFGuru

Avatar

PDFGuru

PDFGuru

20-04-2017

Please send your form at lcdesignerforms@gmail.com i will look at it.

Avatar

Avatar

akgrimes

Avatar

akgrimes

akgrimes

20-04-2017

That didn't work -- no message box popped up when my script looked like this--went straight to print dialog box:

form1::prePrint - (JavaScript, client)

xfa.host.message box ("This is my message. ", "Do not print", 3);

I don't want to completely disable printing -- at the very, very end, when everything is completed, they can print a hard copy for a file if they want. I just don't want them to print it and start doing the worklow "offline."

Avatar

Avatar

PDFGuru

Avatar

PDFGuru

PDFGuru

19-04-2017

also if you want we can disable the printing as well.

Avatar

Avatar

PDFGuru

Avatar

PDFGuru

PDFGuru

19-04-2017

The Pre Print script will run if you put it under form root. see the example at Dropbox - PrePrint.pdf

PrePrint.JPG

Avatar

Avatar

jnicholas330

Avatar

jnicholas330

jnicholas330

18-04-2017

I believe you can disable printing in Acrobat/Reader by applying Restricting Features under Security.