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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Disable print to file printer (soft copy printer) using JavaScript


Level 1

Hi All,

I have a case where end users would select printer from dropdown box and then push print button to print the document silently.  I have done that as following:

form1.main.printerDropdown::initialize - (JavaScript, client)

     var l = app.printerNames.length;

     for ( var i = 0; i < l; i++)   


form1.main.printerDropdown::change - (JavaScript, client)


form1.main.printBtn::click - (JavaScript, client)


     var pp = doc.getPrintParams();

     pp.interactive = pp.constants.interactionLevel.silent;

     pp.NumCopies= 3;

     pp.firstPage = 0;

     pp.lastPage = ( -2);


However, end users do not need soft copy printer (adobe PDF, MS Windows XPS document writer, … etc) to be listed in the dropdown box.  how to identify the printer type (printer or print to file) using JavaScript?

Please advise.

Thanks in advance.


0 Replies