Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Print to PDF Subform


Level 2


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


2 Replies


Level 10


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.



Level 2


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