Changes

Jump to: navigation, search

WebAPI/WebPrintAPI

105 bytes added, 19:41, 8 March 2012
Add open question about onBefore/AfterPrint
Defining the PrintSetting API as used in PrintDocument.print(printSetting) is out of the scope of this document.
<h2> == Notes </h2>==<ul><li> * Use points as metric for printing (72 points per inch)</li><li> * Use of "px" doesn't make sense. Therefore they are forbidden (e.g. in font-size="12px") - use "pt" instead.</li><li> * Use of ctx.putImageData(...) and ctx.getImageData(...) doesn't make sense as there might not be something like "pixels" on the printer backend.</li><li* If the user selects File -> Print from the menu, the developer can * Open Questions<ul><li> ** What is (0,0)? The top left corner of the physical page OR of the page taking into account the print margin?</li><li> ** Should there be different color spaces then RGB? There is a <a href="http://www.w3.org/TR/css3-gcpm/#cmyk-colors">proposal for CMYK colors in CSS</a>.</li><li> ** Should the browser display a progress view while the pages are drawn (this doesn't mean the actual printing output progress)?<** Should there be additional onBeforePrint/onAfterPrint callbacks on the PrintDocument object, or are the window.onBeforePrint/li><li> onAfterPrint events enough?** Lot more... TBD</li></ul></li></ul><h3> === Possible values for the 'scale' property (see below) </h3>===<ul><li> * 'scale': Scales the drawing while keeping the ration to to fit on the print paper size</li><li> * 'fit': Scales the drawing while not taking the ration of the printer paper size in account</li><li> * 'center': No scaling, just placing the center of the drawing onto the center of the printer paper.</li></ul>
== Example ==
49
edits

Navigation menu