Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed GeoServer's map printing module. I've tested that it works by following the instructions here. Now, I'm using GeoExt.PrintMapPanel, and my code is as shown below:

var mapPanel = new GeoExt.MapPanel({
        renderTo: "mappanel",
        map: map,
        layers: [wms, gLayer, vector],
        center: new OpenLayers.LonLat(21.0936111111, 7.18805555556),
        zoom: 2.5,
        tbar: toolbarItems,
        bbar: [{
            icon: "img/printer.png",
            tooltip: "Print map",
            handler: function() {
                var printDialog = new Ext.Window({
                    autoHeight: true,
                    width: 350,
                    items: [new GeoExt.PrintMapPanel({
                        sourceMap: mapPanel,
                        printProvider: {
                            capabilities: printCapabilities
                    bbar: [{
                        text: "Create PDF",
                        handler: function() {

where printCapabilities is http://localhost:8081/geoserver/pdf/info.json?var=printCapabilities, my local installation. I've written this by following the example here.

However, when I try printing, the following error is shown in GeoServer log: org.mapfish.print.JsonMissingException: attribute [spec.pages[0].mapTitle] missing. Any idea on how I can solve this will be appreciated.

share|improve this question
You can answer your own question and accept it so this question is marked as answered. Alternatively, I can close it for you. – underdark Aug 22 '12 at 13:22
Thanks for the pointer, @underdark. – okello Aug 22 '12 at 13:36
up vote 1 down vote accepted

I sorted this out by adjusting printProvider to:

var printProvider = new{
        url: "http://localhost:8081/geoserver/pdf",
        method: "GET", // "POST" recommended for production use
        capabilities: printCapabilities, // from the info.json script in the html
        customParams: {
            mapTitle: "Printing Demo",
            comment: "This is a simple map printed from GeoExt."
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.