I am using PyQGIS with GGIS 3.
I'd like to export my map in a A3 size .pdf (so that my printer prints it directely in A3).
How do I do that?
I did not find the right settings for exporting the pdf.
layout = QgsProject.instance().layoutManager().layoutByName('Example')
pc = layout.pageCollection()
pc.page(0).setPageSize('A3', QgsLayoutItemPage.Orientation.Landscape)
exporter = QgsLayoutExporter(layout)
pdf_settings = QgsLayoutExporter.PdfExportSettings()
pdf_settings.dpi = 300
#pdf_settings.papersize = 'A3' --> is there something alike?
exporter.exportToPdf(result_folder +"\\myA3.pdf", pdf_settings)