Mozilla has just implemented a new web printing api in recent Firefox 18 Nightly builds that aims to improve the print quality in the web browser. It has primarily been added for the web browser's built-in pdf reader pdf.js, but has been implemented to work with all print outs of the browser.
The browser executes a new callback - mozPrintCallback - during the printing process. It can access the printing canvas context and perform "any calls that are normally done to a 2D canvas context". Once done with the rendering the printing proceeds as usual.
Mozilla sees two core benefits over the previous way of printing in the Firefox web browser:
A newly create wiki page over at Mozilla offers additional information about the current WebPrintApi implementation which is mostly interesting to web developers:
The page lists several open questions that Mozilla has not decided upon yet. This includes whether the api should support different color spaces than RGB, whether a progress view should be displayed while the pages are drawn, or how (0,0) is defined.
The printing API is an experimental feature right now, which may or may not make its way into a stable Firefox version. I can't really remember when I printed out the last documents, must have been ages ago. What are your takes on the new printing api that aims to improve quality of the output and the printing process? (via Techdows)Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.