This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt 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 Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Printing functionality using javascript" Watch "Printing functionality using javascript" New topic
Author

Printing functionality using javascript

lokesh pushpa
Greenhorn

Joined: Nov 21, 2011
Posts: 23
Hi
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
page.

Quries:
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
author
Rancher

Joined: Nov 08, 2001
Posts: 15385
    
    6
JavaScript can not control the print settings.
CSS3 has some print settings, but hardly any browser supports them.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Printing functionality using javascript
 
It's not a secret anymore!