开发者

how to set print settings with javascript?

I want to set all print settings like: portrait / landscape, no开发者_如何学C. 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.


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.


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.


For IE: scriptX from Meadroid

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜