- 1 Print Composer
- 1.1 Using Print Composer
The print composer provides growing layout and printing capabilities. It allows you to add elements such as the QGIS map canvas, legend, scalebar, images, and text labels. You can size, group align and position each element and adjust the properties to create your layout. The layout can be printed (also to Postscript and PDF), exported to image formats or to SVG <ref>Export to SVG supported, but it is not working properly with some recent QT4 versions. You should try and check individual on your system</ref> and you can save the layout as template and load it again in another session. See a list of tools in table 4:
Using Print Composer
Before you start to work with the print composer, you need to load some raster and vector layers in the QGIS map canvas and adapt their properties to suite your own convinience. After everything is rendered and symbolized to your liking you click the icon.
Opening the print composer provides you with a blank canvas to which you can add the current QGIS map canvas, legend, scalebar, images and text. Figure 35 shows the initial view of the print composer with an activated modus but before any elements are added. The print composer provides two tabs:
- The tab allows you to set paper size, orientation, the print quality for the output file in dpi and to activate snapping to a grid of a defined resolution. Please note, the feature only works, if you define a grid resolution > 0. Furthermore you can also activate the checkbox. This means all elements will be rastered before printing or saving as Postscript of PDF.
- The icon to select an element (e.g. legend, scalebar or label) on the canvas. Then click the Item tab and customize the settings for the selected element. tab displays the properties for the selected map element. Click the
You can add multiple elements to the composer. It is also possible to have more than one map view or legend or scalebar in the print composer canvas. Each element has its own properties and in the case of the map, its own extent.
Adding a current QGIS map canvas to the Print Composer
To add the QGIS map canvas, click on the button in the print composer toolbar and drag a rectangle on the composer canvas with the left mouse button to add the map. You will see an empty box with a "Map will be printed here" message. To display the current map, you can choose between three different modes in the map tab:
- is the default setting. It only displays an empty box with a message "Map will be printed here".
- renders the map in the current screen resolution. If case you zoom in or out the composer window, the map is not rendered again but the image will be scaled.
- means, that if you zoom in or out the composer window, the map will be rendered again, but for space reasons, only up to a maximum resolution.
You can resize the map later by clicking on the button, selecting the element, and dragging one of the blue handles in the corner of the map. With the map selected, you can now adapt more properties in the map tab. Resize the map item specifying the width and height or the scale. Define the map extend using Y and X min/max values or clicking the button. Update the map preview and select, whether to see a preview from cache or an empty rectangle with a "Map will be printed here" message. Define colors and outline width for the element frame, set a background color and opacity for the map canvas. And you can also select or unselect to display an element frame with the checkbox (see Figure 36). If you change the view on the QGIS map canvas by zooming or panning or changing vector or raster properties, you can update the print composer view selecting the map element in the print composer and clicking the button in the map tab (see Figure 36).
For map navigation the print composer provides 4 general tools:
Adding other elements to the Print Composer
Besides adding a current QGIS map canvas to the Print Composer, it is also possible to add, position, move and customize legend, scalebar, images and label elements.
Label and images
Legend and scalebar
Raise, lower and align elements
Raise or lower functionalities for elements are inside the pulldown menu. Choose an element on the print composer canvas and select the matching functionality to raise or lower the selected element compared to the other elements (see table 4).
There are several alignment functionalities available within the pulldown menu (see table 4). To use an alignment functionality , you first select some elements and then click on the matching alignment icon. All selected will then be aligned within to their common bounding box.
Figure 39 shows the print composer with an example print layout including each type of map element described in the sections above.
The print composer allows you to create several output formats and it is possible to define the resolution (print quality) and paper size:
- The icon allows to print the layout to a connected printer or as PDF or Postscript file depending on installed printer drivers.
- The icon exports the composer canvas in several image formats such as PNG, BPM, TIF, JPG, ...
- The icon saves the print composer canvas as a SVG (Scalable Vector Graphic). Note: Currently the SVG output is very basic. This is not a QGIS problem, but a problem of the underlaying Qt library. This will hopefully be sorted out in future versions.