This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Printing functionality using javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Printing functionality using javascript" Watch "Printing functionality using javascript" New topic

Printing functionality using javascript

lokesh pushpa

Joined: Nov 21, 2011
Posts: 23
I have an requirement on printing functionality:

I have a webpage, there i am keeping one print button and using window.print(), i am able to print.
But here i am not getting exact size fitted into the potrait page. Some alignment issues are coming while printing the

1. How to capture the window features
2. How to adjust the margins using javascript
3. How to fit into a single page.

If any grammer mistakes are there please excuse me.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
JavaScript can not control the print settings.
CSS3 has some print settings, but hardly any browser supports them.
I agree. Here's the link:
subject: Printing functionality using javascript
Similar Threads
how to print the contents of jtextpane.
How to hide the Print button in printed document ?
Disabling the print
Acrobat javascript