2010/12/20 Martin Dobias <wonder...@gmail.com> > Hi Alessandro > > On Mon, Dec 20, 2010 at 2:47 PM, Alessandro Pasotti <apaso...@gmail.com> > wrote: > > 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 > web > > 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) > and > > a print template. > > The idea is that the user can configure the WMS and print template from > QGIS > > 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 > seems > > 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: > > http://www.qgis.org/pyqgis-cookbook/composer.html#output-using-map-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. > > Regards > Martin >
Thanks Martin, 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 success. 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. -- Alessandro Pasotti w3: www.itopen.it
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer