Products QGIS Scripts A4 Map Layout Generator
A4 Map Layout Generator

QGIS Script · Python

A4 Map Layout Generator

Auto-generates an A4 map layout from the current QGIS canvas view — complete with scale bar, north arrow, date title, and legend. Opens directly in the Layout Designer so you can make final adjustments before PDF export.

$20 USD One-time purchase · Instant download
Buy on Gumroad

What you get

create_map_layout.py
Free updates via Gumroad

What it does

Auto scale bar and north arrow

Adds a metric scale bar and north arrow automatically — positioned and sized to fit the page without manual adjustment.

Legend from visible layers

Builds a legend from all currently visible vector layers and their symbology. Hide layers you do not want before running.

Portrait or landscape

Set ORIENTATION to "portrait" or "landscape" at the top of the script. Default is landscape.

Opens in Layout Designer

The layout opens in the QGIS Layout Designer immediately so you can rename the title, reposition elements, or export to PDF.

How to use it

  1. 1

    Style your layers and pan/zoom the QGIS canvas to the extent you want to print.

  2. 2

    Hide any layers you do not want in the legend.

  3. 3

    Open Plugins → Python Console → Show Editor.

  4. 4

    Paste the script. Set ORIENTATION near the top to "portrait" or "landscape".

  5. 5

    Click Run. The layout opens in the Layout Designer.

  6. 6

    Export via Layout → Export as PDF.

Requirements

  • QGIS 3.28 or newer
  • No additional packages needed — uses QGIS layout APIs
  • Layers styled and visible in the canvas as desired

Also in the GIS Utilities Pack

Get all 4 GIS utility scripts for $25 — save $5 vs buying individually.

View bundle