How to find out the dimensionality of print paper in javascript
Posted
by
tzador
on Stack Overflow
See other posts from Stack Overflow
or by tzador
Published on 2010-11-21T06:21:43Z
Indexed on
2010/12/23
3:54 UTC
Read the original article
Hit count: 226
I am generating reports in HTML formats, and want to print them automatically using Qt (qt has a webkit based browser, and one can render its contents to a PDF file). I want to position the elements of the report depending on the target page size. For that i need to access the size of the paper (preferably in pixels).
Since i am using webkit, it has all the latest html5 and css3 features.
is there some api available to access printed page properties inside javascript. for example, would be nice to write: window.print_paper.width or window.print_paper.height
Thank you in advance
© Stack Overflow or respective owner