Printing Current Page with JavaScript

You can execute a script to print a given page
within a multiple page document with or without
the Print dialog box opening.

To print a page from a button action without the
print dialog box opening use the following code:

this.print (false, this.pageNum,
this.pageNum);

Note that false will keep the dialog box from
opening and the item this.pageNum repeated
twice in the statement will print only the current
page in view. Any other pages in the file will not
print.

To print the entire document without the print
dialog box opening, use:

this.print (false); 

You May Also Like

About the Author: Ted Padova

Leave a Reply