I have quite few different print composers. Can I somehow export them to pdf, one pdf for each composer, at the same time?
2 Answers
You can use the "Maps Printer" plugin, or the "multiprint" plugin which has this functionality.
To take it even further, you can export multiple print composers from multiple .qgs files using the method from "Batch export from multiple QGS projects to image or PDF" which uses pyqgis and Maps Printer.
For example, using Maps Printer:
Open the Maps Printer window from Plugins > Maps Printer > Export multiple print composers
Then set your options as needed like selecting an output folder, the print composers to export and output file type. Click Export when ready.
-
For those like me who don't read documentation - in current versions of Maps Printer, the way to access the functionality of the Maps Printer plugin is through the Processing toolbox and not the Plugins menu.– RoelCommented Apr 11, 2023 at 14:58
If you are happy to use PyQGIS, then the following code snippet will export all Print Layouts to PDF - just substitute your preferred directory in place of C:/temp/
:
manager = QgsProject.instance().layoutManager()
for layout in manager.printLayouts():
exporter = QgsLayoutExporter(layout)
exporter.exportToPdf("C:/temp/{}.pdf".format(layout.name()),
QgsLayoutExporter.PdfExportSettings())