7

I want to set all print settings like: portrait / landscape, no. of copies, no. of pages, page size and quality using JavaScript

Is there any way to achieve this?

If yes please tell me how to do this.

3 Answers 3

5

this can not be done with JS. the only thing you can do is a print css:

<link rel="stylesheet" type="text/css" href="print.css" media="print" /> 

this will be used only when you print.

PS: And im happy it can't be done. Imagine every website could mess with your print params.

Sign up to request clarification or add additional context in comments.

2 Comments

Unless you are a corporation.
then you are using IE6 with some active x that makes it possible :P
3

This question is very similar to Supplementary properties/settings for JavaScript:window.print() to enable Backgrounds by default

The best you can do in javascript is window.print() but this only opens the dialog and you cant put in any parameters.

Comments

0

For IE: scriptX from Meadroid

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.