[Geomoose-users] GeoMoose Printing

Jim Klassen klassen.js at gmail.com
Thu Sep 27 11:56:52 PDT 2012


I've been playing around a bit with the idea of printing using HTML5/CSS3 instead of needing a server side component.  My idea is a print tool would create a new window with a new OpenLayers map in some HTML/CSS template that would be simplified and scaled using real units ("in", "cm", etc.) instead of relative units ("em", "px").  I think this could forcing the map width and height in pixels to be ~ 300 dpi on the printed page.

Before spendignI made a simple example to see how the different browsers react before spending a lot of time trying to implement this.

http://www.geomoose.org/10inprint/

It seems not all browsers are quite up to spec though.

Page Margins: Chrome works, Safari/Firefox ignore it.
Image DPI: Chrome, Safari, Firefox work (i.e. it will actually print at 300dpi instead of scaling the 96dpi screen render)
Layout: All three seem to honor the layout/stacking/positioning/transparency.
Media: All three honor selecting a stylesheet for printing.

Firefox and Chrome print to scale (10" is actually 10")
Safari is printing large (which is funny because this is usually the one point Apple is anal about).

Thoughts? Ideas?

Jim



More information about the Geomoose-users mailing list