2010/12/20 Martin Dobias <wonder...@gmail.com> > On Mon, Dec 20, 2010 at 3:19 PM, Alessandro Pasotti <apaso...@gmail.com> > wrote: > > 2010/12/20 Martin Dobias <wonder...@gmail.com> > >> > http://www.qgis.org/pyqgis-cookbook/composer.html#output-using-map-composer > > > > 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. > > Yes that code should work from python console in qgis or within a > plugin. You can also make it working from outside of qgis application > as a command line tool, you will just have to do some bootstrapping: > initialize qgis libraries (QgsApplication: setPrefixPath, initQgis), > load some layers, construct and set up a map renderer > (QgsMapRenderer). The example code omits that for simplicity and uses > map renderer from canvas. > > > > 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. > > This is indeed possible - one just has to initialize all the machinery > as briefly described above. > > Regards > Martin >
I've also tried that way... I've got no more than segfaults: http://dpaste.com/288618/ Can you please take a quick look to my experiment ? http://dpaste.com/288616/ -- Alessandro Pasotti w3: www.itopen.it
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer