[Qgis-developer] Is it possible to re-use print composer code to
build a web service ?
apasotti at gmail.com
Mon Dec 20 09:19:22 EST 2010
2010/12/20 Martin Dobias <wonder.sk at gmail.com>
> Hi Alessandro
> On Mon, Dec 20, 2010 at 2:47 PM, Alessandro Pasotti <apasotti at gmail.com>
> > Hi,
> > I've spent a few hours exploring the codebase while I was thinking about
> > building a web service to generate (vectorial) PDF for a map.
> > IMHO this would be a must, expecially now that QGIS has entered in the
> > service arena with qgis-mapserver.
> > The idea is to build a qgis-mapserver companion which would take care of
> > building a PDF representation of the map using the configured project(s)
> > a print template.
> > The idea is that the user can configure the WMS and print template from
> > GUI, and have a WMS + PDF-print service running with a few clicks.
> > The obvious road for such a service is qgis-mapserver (read layers, map
> > extent etc. from request like WMS does), + qgis-print-composer (read the
> > template name, the resolutions and paper format from request) but it
> > like the print-composer cannot work without a GUI, is this correct ?
> Marco has refactored the composer code few releases ago, so now it's
> possible to use the print composer by calling only qgis_core code.
> There is also a simple example how to use the composer:
> The code saves only a raster image, though saving a PDF should require
> only minor modifications of that code. If you will have any problems
> adapting it, I'll try to provide also PDF example.
I have already found your example, but it is for a plugin, isn't it ?
I remember I tried to make it work from outside qgis (standalone) without
What I would like to achieve is a CGI-style application which takes WMS-like
parameters (like qgis-mapserver does) and a printcomposer template to
generate a (vectorial) PDF.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer