6

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 2

6

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

opening Maps Printer plugin from QGIS

Then set your options as needed like selecting an output folder, the print composers to export and output file type. Click Export when ready.

setting Map Printer plugin options in QGIS

1
  • 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.
    – Roel
    Commented Apr 11, 2023 at 14:58
2

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())

Ref: https://anitagraser.com/pyqgis-101-introduction-to-qgis-python-programming-for-non-programmers/pyqgis-101-exporting-layouts/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.