<div dir="ltr"><div><div><div><div><div>Hi all,<br><br></div>I would like to share an issue I am having while trying to simply export a composition as PDF.<br><br></div>Under QGIS 2.2, I had no problem, but QGIS 2.4 Segfault with the simple steps :<br>
<br></div>c = QgsComposition( QgsMapSettings() )<br>c.setPaperSize( 290, 210 )<br>c.setPrintResolution( 100 )<br>c.setSnapGridOffsetX( 3.5 )<br>c.setSnapGridOffsetY( 0 )<br>c.setSnapGridResolution( 2.5 )<br>c.setNumPages( 1 )<br>
<br>cl = QgsComposerLabel( c )<br>cl.setItemPosition( 0, 10, 100, 100 )<br>content = 'test'<br>cl.setText( content )<br>cl.setFrameEnabled( False )<br>c.addItem( cl )<br><br>c.exportAsPDF( '/tmp/test.pdf' )<br>
</div><br></div><div>NB: I just discoverd that QgsComposition( QgsMapRenderer() ) is deprecated since QGIS 2.4 as explained here: <a href="http://www2.qgis.org/api/deprecated.html">http://www2.qgis.org/api/deprecated.html</a><br>
</div><div>But using it or the new instanciation does not change the problem.<br><br></div><div>Has anyone any hint on this issue ?<br><br>Thanks in advance<br>Michael<br></div><br></div>