Saturday, 10 February 2018

pyqgis - Save Print/Map QGIS composer view as PNG/PDF using Python (without changing anything in visible layout)?


I have a QGIS composer/print view opened with all elements adjusted as I wish. Now I need to print/save/export this as a PNG or PDF file from Python console/Python script.


I do not want to change anything in current layout. Most examples which I found (for example: this), change a map position or size in output PDF comparing to what I see in my current composer view. I wish to receive exactly the same result as I would get when I click on Print --> Export as Image.


How can I do that? Atlas is not a solution for me.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...