This page last changed on Aug 13, 2010 by bmmpxf.

Overview

A very often requested feature from GeoServer is the ability to do printing. GeoServer has a pdf output, but it's not customizable at all. Meanwhile, MapFish has created a pretty advanced printing module, written in Java. And they have some really nice Ext.js tools to create the map.

This project is to hook up the MapFish Printing to the GeoServer Dispatcher, making it a module that can be plugged directly in. That task should be relatively easy, and the rest of the summer can be spent improving the printing. One idea is to improve the configuration of the template, using SVG. Another great route would be to improve the integration with GeoServer, so the printing module could use features directly from the local GeoServer, instead of requesting them in SVG.

This project was originally completed by OpenGeo intern Alan Gerber. Learn more about printing in GeoServer.

Technical Details

Details on the MapFish printing module can be found at:
Sample app
Source code
Documentation and Server config docs

It should already be available as maven poms, so step one would be just making a GeoServer community module that pulls them in properly.

MapFish Printing uses Java Servlets directly - these need to hook up to the GeoServer dispatcher, so it can drop right in as a jar to GeoServer, instead of a war running on the side.

Architecturally the MapFish approach is nice, it works against WMS, Tile Caches, and client side SVG. It composes them together and creates a PDF with iText. iText ships with GeoServer, so it would be good to make sure they use the same version, so we can just ship one jar.

This architecture is nicer than the default way of doing it in GeoServer, which would require truly registering all the layers. So you'd be sort of limited to just layers that are on a GeoServer. But a good web printing module should be able to compose a map from the web, and get it printed.

Keeping the architecture though, we can make some optimizations when we know the module is running on the same JVM as GeoServer. We can pass vectors directly to the mapping output, instead of making it request a big raster or some SVG, which it will just have to reprocess and shoot out. So it should be able to do some intelligent figuring out when it is running by a GeoServer.

Andrea also has some ideas about how to set up a nicer configuration. Instead of the text file one could make a SVG file in Inkscape, and just label various boxes in the right way, and have the Printing module insert the right things in to them. This should give a really high degree of customization, which would be great.

Document generated by Confluence on May 14, 2014 23:00