Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Submit / Print Button ability

Avatar

Level 3

I am wanting to include a single button that both submits the completed PDF form to an email address and prints 3 copies when pressed. Is this possible?

Thanks for your help.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Sure, but I am not sure it would work in the specific way you want. You can create a custom Submit button with an address of mailto: josh@yahoo.com (sample email address) and then set a postSubmit function for the print box to pop up. I do not believe you can set the copies to 3, but you can set everything else up to when the user clicks the button it will pop up within their installed email app with the attached PDF (or whatever option you choose). Then once the user has either hit cancel or send, the print box pops up and the user can enter 3 copies and then enter. Just enter the code below on a postSubmit function on the same Submit button.

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

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

Sure, but I am not sure it would work in the specific way you want. You can create a custom Submit button with an address of mailto: josh@yahoo.com (sample email address) and then set a postSubmit function for the print box to pop up. I do not believe you can set the copies to 3, but you can set everything else up to when the user clicks the button it will pop up within their installed email app with the attached PDF (or whatever option you choose). Then once the user has either hit cancel or send, the print box pops up and the user can enter 3 copies and then enter. Just enter the code below on a postSubmit function on the same Submit button.

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