49
edits
(Add a note to indicate the content is outdated and no plans exist to implement the proposed API.) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Outdated}} | |||
= First iteration: WebPrintAPI = | = First iteration: WebPrintAPI = | ||
Line 14: | Line 16: | ||
* There is only one page size per PrintDocument. | * There is only one page size per PrintDocument. | ||
* The size of the page is defined within the PrintDocument constructor. If the defined page size doesn't fit the printer's page size, the content get's aligned as specified by the 'scale' property (see below). | * The size of the page is defined within the PrintDocument constructor. If the defined page size doesn't fit the printer's page size, the content get's aligned as specified by the 'scale' property (see below). | ||
* The rendering context used for printing (PrintRenderingContext) is very similar to the CanvasRenderingContext2D. | |||
=== Open Questions === | === Open Questions === | ||
Line 22: | Line 25: | ||
* Should there be additional onBeforePrint/onAfterPrint callbacks on the PrintDocument object, or are the window.onBeforePrint/onAfterPrint events enough? | * Should there be additional onBeforePrint/onAfterPrint callbacks on the PrintDocument object, or are the window.onBeforePrint/onAfterPrint events enough? | ||
* This proposal assumes the print page size is passed during the PrintDocument constructor. A different way is to get the page size from the current selected printer's page size. Defining the page size once makes things easier but makes this API on the other side less powerful. | * This proposal assumes the print page size is passed during the PrintDocument constructor. A different way is to get the page size from the current selected printer's page size. Defining the page size once makes things easier but makes this API on the other side less powerful. | ||
* Should there be points2cm, points2inch, inches2points utility functions? | |||
* Lot more... TBD | * Lot more... TBD | ||
Line 176: | Line 180: | ||
// rendering context for preview? | // rendering context for preview? | ||
readonly attribute boolean isPreview; | readonly attribute boolean isPreview; | ||
// dpi resolution. 0.0 = not defined. | |||
readonly attribute double dpi; | |||
// tell the backend that this page has finished rendering. | // tell the backend that this page has finished rendering. | ||
Line 306: | Line 313: | ||
Some basic investigation in the Gecko codebase. No code written so far. | Some basic investigation in the Gecko codebase. No code written so far. | ||
[[Category:Web APIs]] |
edits