3liz / qgis-pgmetadata-plugin

QGIS Plugin to manage some metadata from PostgreSQL layer
GNU General Public License v2.0
12 stars 10 forks source link

Enhancement: Add paper size format options for PDF #155

Open phicote opened 1 year ago

phicote commented 1 year ago

First I have to say that I love the plugin, the developers have done a fantastic job and I use this tool every day. THANKS!

When exporting metadata to PDF, it would be really nice to be able to select between A4 and Letter paper sizes, which is the most common size in North America, rather than just A4. I know it is possible to change the scale of a pdf when printed, but the result gives very wide left/right margins.

from qgis.PyQt.QtCore import QLocale, QUrl, QSizeF printer.setPaperSize(QSizeF(215.9,279.4), QPrinter.Millimeter) printer.setPageMargins(20, 10, 20, 10, QPrinter.Millimeter)