The print composer provides growing layout and printing capabilities. It allows you to add elements such as the QGIS map canvas, legend, scalebar, images, basic shapes, arrows 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 or exported to image formats, Postscript, PDF or to SVG (export to SVG is not working properly with some recent Qt4 versions. You should try and check individual on your system). You can save the layout as template and load it again in another session. See a list of tools in table_composer_1:
Table Composer 1: Print Composer Tools
All Print Composer tools are available in menus and as icons in a toolbar. The toolbar can be switched off and on using the right mouse button holding the mouse over the toolbar.
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 convenience. After everything is rendered and symbolized to your liking you click the New Print Composer icon in the toolbar or choose File ‣ New Print Composer.
Opening the print composer provides you with a blank canvas to which you can add the current QGIS map canvas, legend, scalebar, images, basic shapes, arrows and text. Figure_composer_1 shows the initial view of the print composer with an activated Snap to grid mode but before any elements are added.
Figure Composer 1:
The print composer provides three tabs:
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. If you want to remove any elements from the composer canvas you can do that with the Delete or the Backspace key.
Click on the Add new map toolbar button in the print composer toolbar, to add the QGIS map canvas. Now drag a rectangle on the composer canvas with the left mouse button to add the map. To display the current map, you can choose between three different modes in the map Item Properties tab:
Cache is default preview mode for newly added print composer maps.
You can resize the map element by clicking on the Select/Move item 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 Item Properties tab.
To move layers within the map element select the map element, click the Move item content icon and move the layers within the map element frame with the left mouse button. After you found the right place for an element, you can lock the element position within the print composer canvas. Select the map element and click on the right mouse button to Lock the element position and again to unlock the element. You can lock the map element also activating the Lock layers for map item checkbox in the Map dialog of the Item Properties tab.
註解
QGIS is now able to show labels from the new labeling plugin also in the map composer, but it is not yet scaled correctly. So it might be necessary to switch back to the standard labeling in some cases.
Map dialog
The Map dialog of the map Item Properies tab provides following functionalities (see figure_composer_2):
Figure Composer 2:
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 [Update preview] button.
Extents dialog
The Extents dialog of the map item tab provides following functionalities (see Figure figure_composer_3)):
Figure Composer 3:
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 [Update preview] button in the map Item Properties tab (see Figure figure_composer_2 a)).
Grid dialog
The Grid dialog of the map Item Properties tab provides following functionalities (see Figure_composer_4):
Figure Composer 4:
General options dialog
The General options dialog of the map Item Properties tab provides following functionalities (see Figure_composer_5):
Figure Composer 5:
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.
To add a label, click the Add label icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the label Item Properties tab.
Label dialog
The Label dialog of the label item tab provides following functionalities:
Figure Composer 6:
General options dialog
The General options dialog of the label Item Properties tab provides following functionalities:
Figure Composer 7:
To add an image, click the Add image icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the image Item Properties tab.
Picture options dialog
The Picture options dialog of the image Item Properties tab provides following functionalities (see figure_composer_5 a):
Figure Composer 8:
General options dialog
The General options dialog of the image Item Properties tab provides following functionalities:
Figure Composer 9:
To add a map legend, click the Add new legend icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the legend Item Properties tab.
General dialog
The General dialog of the legend item tab provides following functionalities (see figure_composer_10):
Figure Composer 10:
Legend items dialog
The Legend items dialog of the legend Item Properties tab provides following functionalities (see figure_composer_11):
Figure Composer 11:
General options dialog
The General options dialog of the legend Item Properties tab provides following functionalities (see figure_composer_12):
Figure Composer 12:
To add a scalebar, click the Add new scalebar icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the scalebar Item Properties tab.
Scalebar dialog
The Scalebar dialog of the scalebar Item Properties tab provides following functionalities (see figure_composer_13):
Figure Composer 13:
General options dialog
The General options dialog of the scalebar Item Properties tab provides following features (see figure_composer_7 b)):
Figure Composer 14:
During the layout process it is possible to revert and restore changes. This can be done with the revert and restore tools:
or by mouse click within the Command history tab (see figure_composer_9).
Figure Composer 16:
It is possible to add basic shapes (Ellipse, Rectangle, Triangle) and arrows to the print composer canvas.
The Shape dialog allows to draw an ellipse, rectangle, or triangle in the print composer canvas. You can define its outline and fill color, the outline width and a clockwise rotation.
Figure Composer 18:
The Arrow dialog allows to draw an arrow in the print composer canvas. You can define color, outline and arrow width and it is possible to use a default marker and no marker and a SVG marker. For the SVG marker you can additionally add a SVG start and end marker from a directory on your computer.
Figure Composer 19:
It is possible to add parts of a vector attribute table to the print composer canvas.
Table dialog
The Table dialog of the attribute table item tab provides following functionalities (see figure_composer_20):
Figure Composer 20:
General options dialog
The General options dialog of the attribute table item tab provides following functionalities (see figure_composer_21):
Figure Composer 21:
Raise or lower functionalities for elements are inside the Raise selected items 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_composer_1).
There are several alignment functionalities available within the Align selected items pulldown menu (see table_composer_1). 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_composer_22 shows the print composer with an example print layout including each type of map element described in the sections above.
Figure Composer 22:
The print composer allows you to create several output formats and it is possible to define the resolution (print quality) and paper size:
註解
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.
With the Save as template and Load from template icons you can save the current state of a print composer session as a .qpt template and load the template again in another session.
The Composer Manager button in the QGIS toolbar and in File ‣ Composer Manager allows to add a new composer template or to manage already existing templates.
Figure Composer 23: