Copy link to clipboard
Copied
Howdy everyone!
I am making a PDF form that will allow us to print onto an already printed cardstock form. I need to have the form fields visible while we are filling in the form, but then I only want the form fields to print. I know there is an option to do this in the print menu, but I would like to be able to have a button on the PDF page that allows one click send to the printer. I currently have the below Javascript added to a button that allows the one-click-print, but need to figure out how to add the "print form fields only" as a Javascript...any ideas? Is this possible?
var pp = this.getPrintParams();pp.interactive = pp.constants.interactionLevel.automatic;pp.printerName = "THIS IS THE PRINTER NAME";this.print(pp);
Add this line:
var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic;
pp.printerName = "THIS IS THE PRINTER NAME";
pp.printContent = pp.constants.printContents.formFieldsOnly;
this.print(pp);
Copy link to clipboard
Copied
Use the property printContent for this. Details are in the Acrobat Javascript Reference.
Copy link to clipboard
Copied
Thank you!
Copy link to clipboard
Copied
Add this line:
var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic;
pp.printerName = "THIS IS THE PRINTER NAME";
pp.printContent = pp.constants.printContents.formFieldsOnly;
this.print(pp);
Copy link to clipboard
Copied
Perfect thank you so much!