Document Will Print Action not working as expected

Community Beginner ,
Apr 18, 2020 Apr 18, 2020

Copy link to clipboard

Copied

Script in the document "will print" action executes only after opening print dialog box.

Why it doesn't execute before opening print dialog box?

I saw it in a different pdf file (unfortunately can't edit it because of security settings), where when I click print icon from menu item, it validates the form and then it opens print dialog box. But when I try it in my pdf form, it doesn't work.

I want to execute the script before opening the print dialog box. Is there a way to do it? Please help me.

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms

Views

127

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Apr 19, 2020 Apr 19, 2020
Looks like it is possible with LiveCycle Designer.

Likes

Translate

Translate
Adobe Community Professional ,
Apr 18, 2020 Apr 18, 2020

Copy link to clipboard

Copied

Because opening the print dialog is not the same as printing the file. The Will Print event only executes when the file is actually printed. This is the expected and correct behavior.

If you did see what you described then it must have been through a button that was added to the document itself, or maybe even to the application, which uses a script to perform the validation and only then opens the Print dialog. It's not possible that it happened through the built-in File - Print command.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 18, 2020 Apr 18, 2020

Copy link to clipboard

Copied

Can you share the other file?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 18, 2020 Apr 18, 2020

Copy link to clipboard

Copied

Sorry I can't share the file and I can't edit it because it is signed document. I can share the screenshot for you.

When I click on print icon without filling the form:

 

ss1.jpg

 

Then another dialog box pops up showing print cancelled.

 

ss2.jpg

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 18, 2020 Apr 18, 2020

Copy link to clipboard

Copied

Was the form created with Livecycle Designer?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 19, 2020 Apr 19, 2020

Copy link to clipboard

Copied

Just now, I have checked that pdf document properties and got to know it was developed using Lifecycle Designer.

 

So, we can achieve those actions using Lifecycle designer?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 19, 2020 Apr 19, 2020

Copy link to clipboard

Copied

Looks like it is possible with LiveCycle Designer.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 19, 2020 Apr 19, 2020

Copy link to clipboard

Copied

LATEST

Thanks @Bernd_Alheit

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines