a guest Mar 20th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- # Run in QGIS
- # Save all the layouts as PNG files from the current project.
- outurl = '/Users/USERNAME/' # using ~ does not work?
- outformat = '.png'
- outdpi = 200
- manager = QgsProject.instance().layoutManager()
- for layout in manager.printLayouts():
- print('Saving: ' + layout.name())
- layout = manager.layoutByName(layout.name())
- exporter = QgsLayoutExporter(layout)
- legendExporter.exportToImage(outurl + layout.name() + outformat,imageSettings)
RAW Paste Data