MapFish Print on Ubuntu 24.04 by cloudimg
by cloudimg
MapFish Print, the open source map and report printing REST API, by cloudimg.
MapFish Print is an open source Java service that renders printable map and report documents entirely server side. A client such as a GIS portal, an OpenLayers or GeoMapFish application, or a script sends a JSON print specification describing the layout, the map center and layers, and any titles or legends, and MapFish Print returns a finished PDF, PNG, JPEG, BMP or TIFF built with the JasperReports rendering engine. It has powered production cartographic printing for GIS platforms for over a decade and has no interactive UI of its own: it is a headless backend REST API that other applications call.
The image runs the official print-servlet 4.0.6 WAR on Apache Tomcat 11.0.23 with OpenJDK 21, the exact combination upstream ships in its own official Docker image. Licensing — BSD 2 Clause, FREE. No per-CPU or per-seat fee. The cloudimg charge ($0.04 per vCPU/hour) covers packaging, security patching, image maintenance and 24/7 expert support.
One working example print app ships out of the box: a JasperReports layout with a local, self contained GeoJSON world countries map layer, so you can generate a real PDF with a single API call the moment the VM boots, with no external map server required. Add your own JasperReports templates under the print apps directory and restart the service to register them.
MapFish Print has no application accounts of its own, so first boot generates a unique HTTP Basic Auth password for the print API, written to a root only file, and nginx fronts the whole API with that per VM credential so no default or shared credential ships in the image. Tomcat itself is bound to loopback only; nginx is the only path in from the network.
Recommended: Standard_B2s to start; move to a larger size for large, high DPI or multi map reports.
Prerequisites: Azure subscription, VNet, SSH key. NSG should permit port 22 and port 80.
Guide: https://www.cloudimg.co.uk/guides/mapfish-print-on-ubuntu-24-04-azure/. 24/7 support: support@cloudimg.co.uk.