[Qgis-developer] Scripting QGIS from the outside using Python
madmanwoo at gmail.com
Sun Mar 18 20:22:34 EDT 2012
It's not so much that I don't know how to create a new composer from Python
more that I don't now how to restore a composer item from the project file
I'm using the project file that contains composers as a template which I
need to open and print. What I have seen so far looks like you have to
handle recreating the composer and all its items using the xml like in
the composer object could do with a createFromXML() method which constructs
a composer, and all its children, as per the project file.
On Mon, Mar 19, 2012 at 4:51 AM, Martin Dobias <wonder.sk at gmail.com> wrote:
> On Thu, Mar 15, 2012 at 2:29 PM, Nathan Woodrow <madmanwoo at gmail.com>
> > Is it possible to:
> > Load QGIS from Python (well I know how to do this using
> > QgsApplicaiton.Init())
> > Open the project file
> > Zoom to a location
> > Print the first composer to pdf
> > OR render out the map canvas to a image.
> Hi Nathan
> yes that's all possible from an external python script with PyQGIS,
> without actually starting GUI.
> > From what I can see the only way is to create a new composer item and
> > it the composer node from the xml.
> No need to play with XML, everything can be done using API, there is
> an example in the cookbook:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer