How to find out the dimensionality of print paper in javascript
- by tzador
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