<div dir="ltr"><div><div><div>Hi,<br><br></div>QgsComposition is gone in favor of the new layout classes: see <a href="https://qgis.org/api/classQgsLayout.html">https://qgis.org/api/classQgsLayout.html</a><br><br></div>Have a look to the tests for some usage examples: <a href="https://github.com/qgis/QGIS/blob/master/tests/src/python/test_qgslayout.py">https://github.com/qgis/QGIS/blob/master/tests/src/python/test_qgslayout.py</a><br><br></div>Hope this helps<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 15, 2018 at 12:28 PM, KOHLMANN Hannes <span dir="ltr"><<a href="mailto:H.KOHLMANN@ove.at" target="_blank">H.KOHLMANN@ove.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="DE">
<div class="m_-2621164682244736373WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Hello everyone!<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">I have a short question concerning print composition, as I want to do that via PyQgis in QGIS3:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">I stumbled across the QgsComposition class (<a href="http://kartoza.com/en/blog/how-to-create-a-qgis-pdf-report-with-a-few-lines-of-python" target="_blank">http://kartoza.com/en/blog/<wbr>how-to-create-a-qgis-pdf-<wbr>report-with-a-few-lines-of-<wbr>python</a>)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">I cannot find this class in the Qgis3 API. Usuallly, the Python console in QGIS will suggest me available classes as soon as I type the initials, but all Qgis shows me are some QgsCompound… classes<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Since nothing is mentioned in the backwards incompatible changes (<a href="https://qgis.org/api/api_break.html" target="_blank">https://qgis.org/api/api_<wbr>break.html</a>) I wanted to ask here, maybe I have just overseen something or am
 searching for a wrong class (?)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<div align="center">
<table class="m_-2621164682244736373MsoNormalTable" style="width:100.0%" width="100%" cellpadding="0" border="0">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">QGIS-Version<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">3.0.0-Girona<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">QGIS-Codeversion<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt"><a href="https://github.com/qgis/QGIS/commit/001c80b0c3" target="_blank">001c80b0c3</a><u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">Kompiliert gegen Qt<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">5.9.2<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">Laufendes Qt<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">5.9.2<u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">Kompiliert mit GDAL/OGR<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">2.2.3<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">Läuft mit GDAL/OGR<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">2.2.3<u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">Kompiliert mit GEOS<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">3.5.0-CAPI-1.9.0<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">Läuft mit GEOS<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">3.5.0-CAPI-1.9.0 r4084<u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">PostgreSQL-Client-Version<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">9.2.4<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">SpatiaLite-Version<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">4.3.0<u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">QWT-Version<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">6.1.3<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">QScintilla2-Version<u></u><u></u></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">2.10.1<u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">PROJ.4-Version<u></u><u></u></span></p>
</td>
<td colspan="3" style="padding:0cm 0cm 0cm 0cm">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt">493<u></u><u></u></span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Thanks for help! </span><span style="font-family:Wingdings" lang="EN-GB">J</span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Hannes K.<u></u><u></u></span></p>
</div>
</div>

<br>______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>
</div>