We help IT Professionals succeed at work.

Print Button in HTML,

299 Views
Last Modified: 2013-12-16
I would like to have Print Button in my web pages, Moreover, I would like have predefine rules i.e say the orietation is landscape. So when the user click the print button the orietation is automatically set to landscape.
I was wondering how to do that in HTML/JavaScript.

Code snippet would be good!
Comment
Watch Question

Commented:
http://www.htmlgoodies.com/beyond/javascript/article.php/3471121

As this page says, the following code
---
<A HREF="javascript:window.print()">Click to Print This Page</A>

or

<A HREF="javascript:window.print()">
<IMG SRC="print_image.gif" BORDER="0"</A>

or again

<FORM>
<INPUT TYPE="button" onClick="window.print()">
</FORM>
---

initiates a print request and asks the user for the orientation.

Author

Commented:
How about setting the predefine rules in the web pages? such as the orientation?
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.