<div dir="ltr"><div>Hi,<br></div><div><br></div><div>In startup.py, add the following to register your custom Custom preset format page for print layouts.</div><div><br></div><div><br></div>from qgis.core import QgsApplication, QgsPageSize, QgsLayoutSize, QgsUnitTypes<br><br>pageSizeRegistry = QgsApplication.pageSizeRegistry()<br><br># For demo purpose in PyQGIS, so commented<br># print(len(pageSizeRegistry.entries()))<br># print(pageSizeRegistry.entries()[0].size)<br># print(pageSizeRegistry.entries()[0].displayName)<br># print(pageSizeRegistry.entries()[0].name)<br><br># You will see in the menu, myDisplayName with other default preset format pages after executing the following line<br>pageSizeRegistry.add(QgsPageSize('myname', QgsLayoutSize(150, 100, units=QgsUnitTypes.LayoutMillimeters), 'myDisplayName'))<br><br><div># print(len(pageSizeRegistry.entries()))</div><div><br></div><div>Cheers</div><div><br></div><div>Thomas Gratier<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 29 déc. 2021 à 19:50, Christophe Besuchet <<a href="mailto:design@golok.net">design@golok.net</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello all,<br>
<br>
I'm often using the same custom page size in my print layouts, and I created several templates for this.<br>
<br>
However, if I have to add a new page, the later won't inherit my template's format settings; the Size menu will only propose standard presets and I will have to set the size manually (and the guides as well).<br>
<br>
Is there a way to create and save custom preset format pages so they will show up in the Size menu?<br>
<br>
In advance thank you for your help!<br>
<br>
Golok<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>