cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the print setup to landscape

Former Member
0 Kudos

Hi ,

Is it possible to set the page set up to "landscape" using javascript when printing a BW report.

Many Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Does that mean there is no way to change the page setup?

Former Member
0 Kudos

You can do this using windows shell script. For this you should be able to invoke Active X controls using Javascript. See some hint on this.

http://www.codingforums.com/archive/index.php/t-37144.html

CSS 2 supports setting to landscape, unfortunately no browsers supports it now.

Thanks.

Former Member
0 Kudos

Hi Deepu,

I tried the method suggested in the link. It changed the page set up to landscape, but after that it gives a script error saying that "object does not support this property". Please let me know if we can resolve this or if there is any other way.

Many Thanks.

Former Member
0 Kudos

You will have to change some of the keystrokes send to the browser in the Javascript code. The attached MSDN documentation explains the characters equivalent for each key stroke.

http://msdn.microsoft.com/library/en-us/script56/html/wsmthsendkeys.asp?frame=true

Thanks.

Answers (1)

Answers (1)

Former Member
0 Kudos

Short answer is no - this can't be done using javascript.

I believe this is a security thing - you wouldn't want any old web page being able to change the setup of your printer.