「Print composer」の版間の差分
(→Raise, lower and align elements) |
(→Creating Output) |
||
行218: | 行218: | ||
==== Creating Output ==== | ==== Creating Output ==== | ||
− | Figure [[fig:print_composer_complete]] shows the print composer with an example | + | Figure [[#fig:print_composer_complete|39]] shows the print composer with an example |
print layout including each type of map element described in the sections above. | print layout including each type of map element described in the sections above. | ||
2009年10月5日 (月) 01:33時点における版
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:
To access the print composer, click on the Print button in the toolbar or choose File > Print Composer.
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 Print Composer 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 Snap to grid modus but before any elements are added. The print composer provides two tabs:
- The General 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 Snap to grid feature only works, if you define a grid resolution > 0. Furthermore you can also activate the Print as raster checkbox. This means all elements will be rastered before printing or saving as Postscript of PDF.
- The Item tab displays the properties for the selected map element. Click the Select/Move item 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.
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 Add new map from QGIS map canvas 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 Item tab:
- Preview Rectangle is the default setting. It only displays an empty box with a message "Map will be printed here".
- Preview Cache 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.
- Preview Render 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 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 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 set to map canvas extend 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 frame 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 Update Preview button in the map Item tab (see Figure 36).
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.
For map navigation the print composer provides 4 general tools:
- Zoom in,
- Zoom out,
- Zoom to full extend and
- Refresh the view, if you find the view in an inconsistent state.
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
To add a label or an image, click the Add label or Add image icon, place the element with the left mouse button on the print composer canvas and position and customize their appearance in the Item tab.
|
Legend and scalebar
To add a map legend or a scalebar, click the Add new legend or 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 Item tab.
|
Raise, lower and align elements
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 4).
There are several alignment functionalities available within the Align selected items 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.
Creating Output
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 Print icon allows to print the layout to a connected printer or as PDF or Postscript file depending on installed printer drivers.
- The Export as image icon exports the composer canvas in several image formats such as PNG, BPM, TIF, JPG, ...
- The Export as SVG 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.
Saving and loading a print composer layout
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.