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

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
Adobe Summit 2023 | Complete list of AEM Sessions & Labs

Print to PDF Subform

Avatar

Level 2


Hello,

I have 2 hidden subforms with expandable fields.  If one or both subforms are visible, I'd like a button to print to pdf the visible subforms only.

Can't really indicate page range because they could expand to multiple pages.

This is what I have on a click event so far.

pp = event.target.getPrintParams();

pp.interactive =pp.constants.interactionLevel.automatic;

pp.printerName ="Adobe PDF";

pp.printAsImage =false

event.target.print(pp)

2 Replies

Avatar

Level 10

Hi,

I didn't think you could select a printer, but there is a preprint event you can make anything you don't want printed hidden and then a postPrint even you can make it visible again.

Bruce

Avatar

Level 2

Bruce,

I have separate buttons to toggle show/hide the Subforms.

If Account is checkedIf Account Checked.JPG, then print to PDF the Subform "RC1AccountReviewWorksheet".  This is separate flowed Subform.  Can't define pages to print due to expanding fields.AccountReviewWorksheet.JPG