I have an existing OpenLayers/GeoServer/PostGIS/GeoExt project and I am looking for a way to print an OpenLayers map that contains WFS layers, vector layers dynamically created by users, and WMS layers.

I currently use MapFish and the GeoServer print plugin to generate maps but MapFish cannot handle the WFS or vector layers.

Is there a way to programmatically call QGIS from javascript and send my exiting OpenLayers map object with all its layers to QGIS so users can print the map?

1 Answer 1


QGIS is a desktop program, you could create a project file with the WFS/WMS layers then modify the xml of the QGIS project file to load up in the extent that the Open Layers map is in. Export the user drawn layer to json and then they can load that in a print. But that relies on the user having QGIS.

Alternatively see the answer to this question and modify your code accordingly What are MapFish Printing Capabilities for WMS and WFS?

  • One option would be to setup QGIS on a server, send the request in via http/json, process using pyqgis, and the server returns the image file.
    – artwork21
    Jan 22, 2016 at 17:01

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.