HSLayers includes printing setup, so that content of the map can be printed at any printer or used in other desktop GIS workstation. The printing client enables the user, to choose between printing a map to a pre-defined template (PDF or HTML output) or saving the content of the map into a raster image (image output).
When the user makes a choice, that he wants to create a raster image with the map’s current content, he can either directly click the button, and a copy of the map window will be displayed, according to the selected image format (which can be one of PNG, JPEG, GIF and geo-referenced GeoTIFF). The desired scale and region can be set as well. When a user chooses to print a map to a pre-defined template, a new box is drawn, representing the paper box.
Users can move the paper over the map and define the desired region. The size of the paper box is always adjusted according to the selected scale. Additional information can be added as well (map title, description, icon). The map is then layouted according to selected pre-defined template to PDF or HTML output. The template is prepared as a HTML page. Printing is provided by a server script, which is able to work with standard WMS services, tiled-layer, vector data and other inputs. The paper is dependant on prepared templates - it can be virtually anything from A5 to A0.
For the printing, server component is used, which uses MapServer mapscript for preparing the mapfile according to displayed map layers (raster, service or vector) and layouts the map in the desired form (PDF according to template or simple image). Output templates are HTML-based, and they are converted from HTML to PDF using webkit renderer.