I searched lots of places but I couldn't find proper examples or documentation to do printing using Mapfish Printing service or Wkhtmltopdf. My application has a few WFS layers from openlayers and geoserver only (no WMS). So is printing possible from the above two methods or not?

Also, I would like to add that I am using OpenStreetMap (OSM) as baselayer.

Actually, I am requesting mapfish printing (integrated with geoserver) service through url. Through my URL, I am getting wms layer in print out but not osm layer and also if you can tell me how I can request for geojson wfs layer through url?

Mapfish printing working properly and this is my info.json details:

{"name":"300","value":"300"}],"layouts":[{"name":"A4 portrait","map":

Details for osm layer which I am requesting in url is:

{"baseURL":"http://tile.openstreetmap.org/",' +
          '"opacity":1,' +
            '"singleTile":false,' +
            '"customParams":{},' +
            '"type":"OSM",' +
            '"tileSize" : [256, 256],'+
            '"maxExtent" : [-20037508.34,-20037508.34,20037508.34,20037508.34],'+
            '"resolutions" : [19567.87923828125],'+
            '}],' +   //am getting error,could not be able to fetch tiles 404 error.

One more thing I would like to ask: is it feasible to have the same screenshot (display) on pdf which the user can see at that moment in browser and click for print request? Since I am using the service and reading it from server side, how can I get the pdf of what the user is seeing in client side if this is possible?

2 Answers 2


It seems that MapFish accepts well WFS as GeoJSON, never tried that though:

What are MapFish Printing Capabilities for WMS and WFS?

Since you're using Geoserver, you can try GeoExplorer, it may easily work for you:


Check this also out:

How to edit using a WFS service, without showing it on the map in OpenLayers?


Is this what you are looking for ?


  • Thanks for replying @Below and i am sorry this will not help me but thanks anyway.Actually i wanted working examples and documentation that how to do printing with the help of Mapfish or wkhtmltopdf(Integration with openlayers and geoserver). Since i already tried these two methods but without success.If u have any links for that then that would be very helpful,thanks in advance.
    – Adarsh
    Commented Mar 6, 2014 at 4:53
  • every info you need is in this demo. If you have particular problems, please edit your question and provide details on what you have done so far and what is not working. Good Luck! Commented Mar 6, 2014 at 14:23
  • 1
    Thanks again for replying @Below,I tried to give information as much as i can, if something not explainable then please do tell me. Thanks
    – Adarsh
    Commented Mar 7, 2014 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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