WebAPI/WebPrintAPI: Difference between revisions

Jump to navigation Jump to search
Update question about CMYK colors + add proposal link
(Update question about CMYK colors + add proposal link)
Line 7: Line 7:
Defining the PrintSetting API as used in PrintDocument.print(printSetting) is out of the scope of this document.
Defining the PrintSetting API as used in PrintDocument.print(printSetting) is out of the scope of this document.


== Notes ==
<h2> Notes </h2>
 
<ul><li> Use points as metric for printing (72 points per inch)
* 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.
* 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.
* 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> Open Questions
* 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?
** 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>.
** Should there be different color spaces then RGB? How to make them work, as there are no CSS colors defined for CMYK.
</li><li> Should the browser display a progress view while the pages are drawn (this doesn't mean the actual printing output progress)?
** Should the browser display a progress view while the pages are drawn (this doesn't mean the actual printing output progress)?
</li><li> Lot more... TBD
** Lot more... TBD
</li></ul>
 
</li></ul>
=== Possible values for the 'scale' property (see below) ===
<h3> Possible values for the 'scale' property (see below) </h3>
* 'scale': Scales the drawing while keeping the ration to to fit on the print paper size
<ul><li> 'scale': Scales the drawing while keeping the ration to to fit on the print paper size
* 'fit': Scales the drawing while not taking the ration of the printer paper size in account
</li><li> 'fit': Scales the drawing while not taking the ration of the printer paper size in account
* 'center': No scaling, just placing the center of the drawing onto the center of the printer paper.
</li><li> 'center': No scaling, just placing the center of the drawing onto the center of the printer paper.
</li></ul>


== Example ==
== Example ==
49

edits

Navigation menu