21.1. Overview of the Print Layout

The print layout provides growing layout and printing capabilities. It allows you to add elements such as the QGIS map canvas, text labels, images, legends, scale bars, basic shapes, arrows, attribute tables and HTML frames. You can size, group, align, position and rotate each element and adjust their properties to create your layout. The layout can be printed or exported to image formats, PostScript, PDF or to SVG. You can save the layout as a template and load it again in another session. Finally, generating several maps based on a template can be done through the atlas generator.

21.1.1. Sample Session for beginners

Before you start to work with the print layout, you need to load some raster or vector layers in the QGIS map canvas and adapt their properties to suit your own convenience. After everything is rendered and symbolized to your liking, click the newLayout New Print Layout icon in the Project toolbar or choose Project ► newLayout New Print Layout. You will be prompted to choose a title for the new layout.

To demonstrate how to create a map please follow the next instructions.

  1. On the left side, select the addMap Add map toolbar button and draw a rectangle on the canvas holding down the left mouse button. Inside the drawn rectangle the QGIS map view to the canvas.

  2. Select the scaleBar Add scalebar toolbar button and click with the left mouse button on the print layout canvas. A scalebar will be added to the canvas.

  3. Select the addLegend Add legend toolbar button and draw a rectangle on the canvas holding down the left mouse button. Inside the drawn rectangle the legend will be drawn.

  4. Select the select Select/Move item icon to select the map on the canvas and move it a bit.

  5. While the map item is still selected you can also change the size of the map item. Click while holding down the left mouse button, in a white little rectangle in one of the corners of the map item and drag it to a new location to change its size.

  6. Click the Item Properties panel on the left down side and find the setting for the orientation. Change the value of the setting Map orientation to «15.00° «. You should see the orientation of the map item change.

  7. Now, you can print or export your print layout to image formats, PDF or to SVG with the export tools in Layout menu.

  8. Finally, you can save your print layout within the project file with the fileSave Save Project button.

You can add multiple elements to the print layout. It is also possible to have more than one map view or legend or scale bar in the print layout canvas, on one or several pages. Each element has its own properties and, in the case of the map, its own extent. If you want to remove any elements from the layout canvas you can do that with the Delete or the Backspace key.

21.1.2. The Layout Manager

The Layout Manager is the main window to manage print layouts in the project. It gives you an overview of existing print layouts and reports in the project and offers tools to:

  • search for a layout;

  • add new print layout or new report from scratch, template or duplicating an existing one;

  • rename or delete any of them;

  • open them in the project.

To open the layout manager dialog:

  • from the main QGIS dialog, select Project ► Layout Manager… menu or click on the layoutManager Layout Manager button in the Project Toolbar;

  • from a print layout or report dialog, select Layout ► Layout Manager… menu or click on the layoutManager Layout Manager button in the Layout Toolbar.

../../../_images/print_composer_manager.png

21.1. ábra The Print Layout Manager

The layout manager lists in its upper part all the available print layouts or reports in the project with tools to:

  • show the selection: you can select multiple reports and/or print layout(s) and open them in one-click. Double-click a name also opens it;

  • duplicate the selected print layout or report (available only if one item is selected): it creates a new dialog using the selected one as template. You’ll be prompted to choose a new title for the new layout;

  • rename the report or layout (available only if one item is selected): you’ll be prompted to choose a new title for the layout;

  • remove the layout: the selected print layout(s) will be deleted from the project.

In the lower part, it’s possible to create new print layouts or reports from scratch or a template. By default, QGIS will look for templates in the user profile and the application template directories (accessible with the two buttons at the bottom of the frame) but also in any folder declared as Path(s) to search for extra print templates in Settings ► Options ► Layouts. Found templates are listed in the combobox. Select an item and press the Create button to generate a new report or print layout.

You can also use layout templates from a custom folder; in that case, select specific in the templates drop-down list, browse to the template and press Create.

Javaslat

Creating template-based print layouts from Browser panel

Drag-and-drop a print layout template .qpt file from any file browser onto the map canvas or double-click it in the Browser panel generates a new print layout from the template.