「Print composer」の版間の差分

提供: OSGeo.JP Wiki
移動: 案内検索
(タグ・画像調整前に一旦配下を統合)
(タグ一括置換状態で一旦保存)
行1: 行1:
<H1>
+
== Print Composer ==
Print Composer
+
<span id='label_printcomposer'></span>
</H1>
+
  
<P>
 
 
The print composer provides growing layout and printing
 
The print composer provides growing layout and printing
 
capabilities. It allows you to add elements such as the QGIS map canvas,  
 
capabilities. It allows you to add elements such as the QGIS map canvas,  
行9: 行7:
 
align and position each element and adjust the properties to create your
 
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
 
layout. The layout can be printed (also to Postscript and PDF), exported to
image formats or to SVG and you can save the layout as template and
+
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
 
load it again in another session. See a list of tools in
table&nbsp;<A HREF="#tab:printcomposer_tools">4</A>:
+
table~[[tab:printcomposer_tools]]:
  
<P>
+
<table border='1' aligh='center'><caption>'''Table xx:''' Print Composer Tools</caption><span id='tab:printcomposer_tools'></span>
<BR><P></P>
+
<!-- {|l|p{6.9cm}|l|p{6.9cm}|} -->
<DIV ALIGN="CENTER">
+
<tr><td> '''Icon''' <td> '''Purpose''' <td> '''Icon''' <td>
 +
'''Purpose''' </tr>
 +
<tr><td> [[File:mActionFolder.png|26px]]
 +
<td> Load from template <td>
 +
[[File:mActionFileSaveAs.png|26px]] <td> Save as template </tr>
 +
<tr><td> [[File:mActionExportMapServer.png|26px]]
 +
<td> Export to an image format <td>
 +
[[File:mActionSaveAsSVG.png|26px]] <td> Export print composition
 +
to SVG </tr>
 +
<tr><td> [[File:mActionFilePrint.png|26px]] <td> Print or
 +
export as PDF or Postscript <td>
 +
[[File:mActionZoomFullExtent.png|26px]] <td> Zoom to
 +
full extend </tr>
 +
<tr><td> [[File:mActionZoomIn.png|26px]] <td> Zoom in <td>
 +
[[File:mActionZoomOut.png|26px]] <td> Zoom out </tr>
 +
<tr><td> [[File:mActionDraw.png|26px]] <td> Refresh
 +
view <td>
 +
[[File:mActionAddRasterLayer.png|26px]] <td> Add
 +
new map from QGIS map canvas </tr>
 +
<tr><td> [[File:mActionSaveMapAsImage.png|26px]] <td> Add Image to
 +
print composition <td>
 +
[[File:mActionLabel.png|26px]] <td> Add label to print composition </tr>
 +
<tr><td> [[File:mActionAddLegend.png|26px]] <td> Add new legend to
 +
print composition <td>
 +
[[File:mActionScaleBar.png|26px]] <td> Add new scalebar to print
 +
composition</tr>
 +
<tr><td> [[File:mActionSelectPan.png|26px]] <td> Select/Move item in
 +
print composition <td>
 +
[[File:mActionMoveItemContent.png|26px]] <td> Move content within
 +
an item </tr>
 +
<tr><td> [[File:mActionGroupItems.png|26px]] <td> Group items of
 +
print composition <td>
 +
[[File:mActionUngroupItems.png|26px]] <td> Ungroup items of print
 +
composition </tr>
 +
<tr><td> [[File:mActionRaiseItems.png|26px]] <td> Raise selected
 +
items  <td>
 +
[[File:mActionLowerItems.png|26px]] <td> Lower selected items </tr>
 +
<tr><td> [[File:mActionMoveItemsToTop.png|26px]] <td> Move selected
 +
items to top <td>
 +
[[File:mActionMoveItemsToBottom.png|26px]] <td> Move selected
 +
items to bottom </tr>
 +
<tr><td> [[File:mActionAlignLeft.png|26px]] <td> Align selected
 +
items left <td>
 +
[[File:mActionAlignRight.png|26px]] <td> Align selected items
 +
right </tr>
 +
<tr><td> [[File:mActionAlignHCenter.png|26px]] <td> Align selected
 +
items center <td>
 +
[[File:mActionAlignVCenter.png|26px]] <td> Align selected items
 +
center vertical </tr>
 +
<tr><td> [[File:mActionAlignTop.png|26px]] <td> Align selected
 +
items top <td>
 +
[[File:mActionAlignBottom.png|26px]] <td> Align selected
 +
items bottom </tr>
 +
</table>
  
<DIV ALIGN="CENTER">
+
To access the print composer, click on the {{Template:ToolBtnTwo|mActionFilePrint|Print}}
 +
button in the toolbar or choose {{Template:MainMenuOpt|File}} > {{Template:DropMenuOptTwo|mActionFilePrint|Print Composer}}.
  
</DIV>
+
=== Using Print Composer ===
<TABLE CELLPADDING=3 BORDER="1">
+
<span id='label_useprintcomposer'></span>  
<CAPTION><STRONG>Table 4:</STRONG>
+
Print Composer Tools</CAPTION>
+
<TR><TH ALIGN="LEFT"><SPAN  CLASS="textbf">Icon</SPAN></TH>
+
<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=196><SPAN  CLASS="textbf">Purpose</SPAN></TH>
+
<TH ALIGN="LEFT"><SPAN  CLASS="textbf">Icon</SPAN></TH>
+
<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=196><SPAN  CLASS="textbf">Purpose</SPAN></TH>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionFolder</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Load from template</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionFileSaveAs</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Save as template</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionExportMapServer</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Export to an image format</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionSaveAsSVG</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Export print composition
+
to SVG</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionFilePrint</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Print or
+
export as PDF or Postscript</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionZoomFullExtent</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Zoom to
+
full extend</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionZoomIn</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Zoom in</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionZoomOut</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Zoom out</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionDraw</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Refresh
+
view</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionAddRasterLayer</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Add
+
new map from QGIS map canvas</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionSaveMapAsImage</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Add Image to
+
print composition</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionLabel</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Add label to print composition</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionAddLegend</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Add new legend to
+
print composition</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionScaleBar</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Add new scalebar to print
+
composition</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionSelectPan</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Select/Move item in
+
print composition</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionMoveItemContent</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Move content within
+
an item</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionGroupItems</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Group items of
+
print composition</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionUngroupItems</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Ungroup items of print
+
composition</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionRaiseItems</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Raise selected
+
items</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionLowerItems</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Lower selected items</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionMoveItemsToTop</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Move selected
+
items to top</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionMoveItemsToBottom</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Move selected
+
items to bottom</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionAlignLeft</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Align selected
+
items left</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionAlignRight</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Align selected items
+
right</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionAlignHCenter</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Align selected
+
items center</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionAlignVCenter</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Align selected items
+
center vertical</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]mActionAlignTop</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Align selected
+
items top</TD>
+
<TD ALIGN="LEFT">[width=0.7cm]mActionAlignBottom</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=196>Align selected
+
items bottom</TD>
+
</TR>
+
</TABLE>
+
</DIV>
+
<BR>
+
 
+
<P>
+
To access the print composer, click on the mActionFilePrintPrint
+
button in the toolbar or choose File &gt; mActionFilePrintPrint Composer.
+
 
+
<P>
+
<BR><HR>
+
<!--Table of Child-Links-->
+
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
+
 
+
<UL CLASS="ChildLinks">
+
<LI><A NAME="tex2html30"
+
  HREF="node2.html">Using Print Composer</A>
+
<UL>
+
<LI><A NAME="tex2html31"
+
  HREF="node3.html">Adding a current QGIS map canvas to the Print Composer</A>
+
<LI><A NAME="tex2html32"
+
  HREF="node4.html">Navigation tools</A>
+
<LI><A NAME="tex2html33"
+
  HREF="node5.html">Adding other elements to the Print Composer</A>
+
<LI><A NAME="tex2html34"
+
  HREF="node6.html">Raise, lower and align elements</A>
+
<LI><A NAME="tex2html35"
+
  HREF="node7.html">Creating Output</A>
+
<LI><A NAME="tex2html36"
+
  HREF="node8.html">Saving and loading a print composer layout</A>
+
</UL></UL>
+
<!--End of Table of Child-Links-->
+
 
+
<H2>
+
Using Print Composer
+
</H2>
+
 
+
<P>
+
 
Before you start to work with the print composer, you need to load some  
 
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  
 
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  
 
to suite your own convinience. After everything is rendered and symbolized to  
your liking you click the mActionFilePrintPrint Composer icon.
+
your liking you click the {{Template:ToolBtnTwo|mActionFilePrint|Print Composer}} icon.
 
+
<P>
+
 
+
<DIV ALIGN="CENTER"><A NAME="fig:print_composer_blank"></A><A NAME="57"></A>
+
<TABLE>
+
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
Print Composer </CAPTION>
+
<TR><TD>
+
<DIV ALIGN="CENTER">
+
</DIV>
+
<P></P>
+
<DIV ALIGN="CENTER">  [clip=true, width=]print_composer_blank
+
  
</DIV></TD></TR>
+
<table align='center'>
</TABLE>
+
<caption>'''Figure xx:''' Print Composer {{Template:Nix</caption>
</DIV>
+
<tr><td>}caption}<span id='fig:print_composer_blank'></span>
 +
  [[File:print_composer_blank.png|740px]]</td></tr></table>
  
<P>
 
 
Opening the print composer provides you with a blank canvas to which you can  
 
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
 
add the current QGIS map canvas, legend, scalebar, images and text. Figure
<A HREF="#fig:print_composer_blank">37</A> shows the initial view of the print composer  
+
[[fig:print_composer_blank]] shows the initial view of the print composer  
with an activated Snap to grid modus but before any elements are
+
with an activated {{Template:CheckBox|Snap to grid}} modus but before any elements are
 
added. The print composer provides two tabs:
 
added. The print composer provides two tabs:
  
<P>
+
<ul>
 
+
<li>The {{Template:Tab|General}} tab allows you to set paper size, orientation, the
<UL>
+
<LI>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
 
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
+
of a defined resolution. Please note, the {{Template:CheckBox|Snap to grid}} feature
only works, if you define a grid resolution &gt; 0. Furthermore you can also
+
only works, if you define a grid resolution > 0. Furthermore you can also
activate the Print as raster checkbox. This means all elements
+
activate the {{Template:CheckBox|Print as raster}} checkbox. This means all elements
 
will be rastered before printing or saving as Postscript of PDF.
 
will be rastered before printing or saving as Postscript of PDF.
</LI>
+
<li>The {{Template:Tab|Item}} tab displays the properties for the selected map element.  
<LI>The Item tab displays the properties for the selected map element.  
+
Click the {{Template:ToolBtnTwo|mActionSelectPan|Select/Move item}}
Click the mActionSelectPanSelect/Move item  
+
 
icon to select an element (e.g. legend, scalebar or label) on the canvas.  
 
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  
 
Then click the Item tab and customize the settings for the selected  
 
element.
 
element.
</LI>
+
</ul>
</UL>
+
  
<P>
 
 
You can add multiple elements to the composer. It is also possible to have  
 
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.  
 
more than one map view or legend or scalebar in the print composer canvas.  
行208: 行111:
 
extent.
 
extent.
  
<P>
+
==== Adding a current QGIS map canvas to the Print Composer ====
<BR><HR>
+
  
 
+
To add the QGIS map canvas, click on the {{Template:ToolBtnTwo|mActionAddRasterLayer|Add new map  
<H3>
+
from QGIS map canvas}} button in the print composer toolbar and drag a  
Adding a current QGIS map canvas to the Print Composer
+
</H3>
+
 
+
<P>
+
To add the QGIS map canvas, click on the mActionAddRasterLayerAdd 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.  
 
rectangle on the composer canvas with the left mouse button to add the map.  
You will see an empty box with a <SPAN  CLASS="textit">"Map will be printed here"</SPAN> message.
+
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
 
To display the current map, you can choose between three different modes in
the map Item tab:
+
the map {{Template:Tab|Item}} tab:
 
+
<P>
+
  
<UL>
+
<ul>
<LI>PreviewRectangle is the default setting. It only
+
<li>{{Template:SelectString|Preview|Rectangle}} is the default setting. It only
displays an empty box with a message <SPAN  CLASS="textit">"Map will be printed here"</SPAN>.  
+
displays an empty box with a message ''"Map will be printed here"''.  
</LI>
+
<li>{{Template:SelectString|Preview|Cache}} renders the map in the current screen
<LI>PreviewCache renders the map in the current screen
+
 
resolution. If case you zoom in or out the composer window, the map is not
 
resolution. If case you zoom in or out the composer window, the map is not
 
rendered again but the image will be scaled.
 
rendered again but the image will be scaled.
</LI>
+
<li>{{Template:SelectString|Preview|Render}} means, that if you zoom in or out the
<LI>PreviewRender means, that if you zoom in or out the
+
 
composer window, the map will be rendered again, but for space reasons, only
 
composer window, the map will be rendered again, but for space reasons, only
 
up to a maximum resolution.
 
up to a maximum resolution.
</LI>
+
</ul>
</UL>
+
  
<P>
+
<table align='center'>
 +
<caption>'''Figure xx:''' Print Composer map item tab content {{Template:Nix</caption>
 +
<tr><td>}caption}<span id='fig:print_composer_map_item'></span>
 +
  <table align='center'><caption align='bottom'>(x) Width, height and extend dialog</caption><tr><td><span id='subfig:print_composer_map_item1'></span>[[File:print_composer_map_item1.png|296px]]</td></tr></table>
 +
  <table align='center'><caption align='bottom'>(x) Properties dialog</caption><tr><td><span id='subfig:print_composer_map_item2'></span>[[File:print_composer_map_item2.png|296px]]</td></tr></table>
 +
</td></tr></table>
  
<DIV ALIGN="CENTER"><A NAME="fig:print_composer_map_item"></A><A NAME="subfig:print_composer_map_item1"></A><A NAME="subfig:print_composer_map_item2"></A><A NAME="87"></A>
+
You can resize the map later by clicking on the {{Template:ToolBtnTwo|mActionSelectPan|Select/Move item}}
<TABLE>
+
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
Print Composer map item tab content </CAPTION>
+
<TR><TD>
+
<DIV ALIGN="CENTER">
+
 
+
</DIV>  [Width, height and extend dialog] [clip=true, width=0.4]print_composer_map_item1
+
  [Properties dialog] [clip=true, width=0.4]print_composer_map_item2</TD></TR>
+
</TABLE>
+
</DIV>
+
 
+
<P>
+
You can resize the map later by clicking on the mActionSelectPanSelect/Move item  
+
 
button, selecting the element, and dragging one of the blue handles in the corner of the map. With 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 Item tab. Resize the map  
+
map selected, you can now adapt more properties in the map {{Template:Tab|Item}} tab. Resize the map  
 
item specifying the width and height or the scale. Define the map extend using Y and  
 
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  
+
X min/max values or clicking the {{Template:Button|set to map canvas extend}} button. Update the  
 
map preview and select, whether to see a preview from cache or an empty rectangle with  
 
map preview and select, whether to see a preview from cache or an empty rectangle with  
a <SPAN  CLASS="textit">"Map will be printed here"</SPAN> message. Define colors and outline width for the  
+
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  
 
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  
+
select or unselect to display an element frame with the {{Template:CheckBox|frame}} checkbox  
(see Figure&nbsp;<A HREF="#fig:print_composer_map_item">38</A>). If you change the view on the QGIS  
+
(see Figure~[[fig:print_composer_map_item]]). If you change the view on the QGIS  
 
map canvas by zooming or panning or changing vector or raster properties, you can  
 
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  
 
update the print composer view selecting the map element in the print composer and clicking  
the Update Preview button in the map Item tab  
+
the {{Template:Button|Update Preview}} button in the map {{Template:Tab|Item}} tab  
(see Figure&nbsp;<A HREF="#fig:print_composer_map_item">38</A>).  
+
(see Figure~[[fig:print_composer_map_item]]).  
  
<P>
 
 
To move layers within the map element select the map element, click  
 
To move layers within the map element select the map element, click  
the mActionMoveItemContentMove item content icon  
+
the {{Template:ToolBtnTwo|mActionMoveItemContent|Move item content}} icon  
 
and move the layers within the map element frame with the left mouse button.
 
and move the layers within the map element frame with the left mouse button.
  
<P>
+
==== Navigation tools ====
  
<!--Table of Child-Links-->
 
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
 
 
<UL CLASS="ChildLinks">
 
 
<LI><A NAME="tex2html46"
 
  HREF="node4.html">Navigation tools</A>
 
<LI><A NAME="tex2html47"
 
  HREF="node5.html">Adding other elements to the Print Composer</A>
 
<LI><A NAME="tex2html48"
 
  HREF="node6.html">Raise, lower and align elements</A>
 
<LI><A NAME="tex2html49"
 
  HREF="node7.html">Creating Output</A>
 
<LI><A NAME="tex2html50"
 
  HREF="node8.html">Saving and loading a print composer layout</A>
 
</UL>
 
 
<H3>
 
Navigation tools
 
</H3>
 
 
<P>
 
 
For map navigation the print composer provides 4 general tools:
 
For map navigation the print composer provides 4 general tools:
  
<P>
+
<ul>
 
+
<li>{{Template:ToolBtnTwo|mActionZoomOut|Zoom in}},
<UL>
+
<li>{{Template:ToolBtnTwo|mActionZoomOut|Zoom out}},
<LI>mActionZoomOutZoom in,
+
<li>{{Template:ToolBtnTwo|mActionZoomFullExtent|Zoom to full extend}} and
</LI>
+
<li>{{Template:ToolBtnTwo|mActionDraw|Refresh the view}}, if you find the view in an
<LI>mActionZoomOutZoom out,
+
</LI>
+
<LI>mActionZoomFullExtentZoom to full extend and
+
</LI>
+
<LI>mActionDrawRefresh the view, if you find the view in an
+
 
inconsistent state.
 
inconsistent state.
</LI>
+
</ul>
</UL>
+
  
<P>
 
  
<H3>
+
==== Adding other elements to the Print Composer ====
Adding other elements to the Print Composer
+
</H3>
+
 
+
<P>
+
 
Besides adding a current QGIS map canvas to the Print Composer, it is also possible  
 
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, position, move and customize legend, scalebar, images and label elements.
  
<P>
+
===== Label and images =====
Label and images
+
  
<P>
+
To add a label or an image, click the {{Template:ToolBtnTwo|mActionLabel|Add label}} or  
To add a label or an image, click the mActionLabelAdd label or  
+
{{Template:ToolBtnTwo|mActionSaveMapAsImage|Add image}} icon, place the element with
mActionSaveMapAsImageAdd image icon, place the element with
+
 
the left mouse button on the print composer canvas and position and customize
 
the left mouse button on the print composer canvas and position and customize
their appearance in the Item tab.  
+
their appearance in the {{Template:Tab|Item}} tab.  
  
<P>
+
<table align='center'>
 +
<caption>'''Figure xx:''' Customize print composer label and images {{Template:Nix</caption>
 +
<tr><td>}caption}<span id='fig:print_composer_tab2'></span>
 +
  <table align='center'><caption align='bottom'>(x) label item tab</caption><tr><td><span id='subfig:print_composer_label_item'></span>[[File:print_composer_label_item.png|296px]]</td></tr></table>
 +
  <table align='center'><caption align='bottom'>(x) image item tab</caption><tr><td><span id='subfig:print_composer_image_item'></span>[[File:print_composer_image_item.png|296px]]</td></tr></table>
 +
</td></tr></table>
  
<DIV ALIGN="CENTER"><A NAME="fig:print_composer_tab2"></A><A NAME="subfig:print_composer_label_item"></A><A NAME="subfig:print_composer_image_item"></A><A NAME="125"></A>
+
===== Legend and scalebar =====
<TABLE>
+
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
Customize print composer label and images </CAPTION>
+
<TR><TD>
+
<DIV ALIGN="CENTER">
+
  
</DIV>  [label item tab] [clip=true, width=0.4]print_composer_label_item
+
To add a map legend or a scalebar, click the {{Template:ToolBtnTwo|mActionAddLegend|Add new legend}} or
  [image item tab] [clip=true, width=0.4]print_composer_image_item</TD></TR>
+
{{Template:ToolBtnTwo|mActionScaleBar|Add new scalebar}} icon, place the element with the left
</TABLE>
+
mouse button on the print composer canvas and position and customize their appearance in the {{Template:Tab|Item}} tab.
</DIV>
+
  
<P>
+
<table align='center'>
Legend and scalebar
+
<caption>'''Figure xx:''' Customize print composer legend and scalebar {{Template:Nix</caption>
 +
<tr><td>}caption}<span id='fig:print_composer_tab1'></span>
 +
  <table align='center'><caption align='bottom'>(x) legend item tab</caption><tr><td><span id='subfig:print_composer_legend_item'></span>[[File:print_composer_legend_item.png|296px]]</td></tr></table>
 +
  <table align='center'><caption align='bottom'>(x) scalebar item tab</caption><tr><td><span id='subfig:print_composer_scalebar_item'></span>[[File:print_composer_scalebar_item.png|296px]]</td></tr></table>
 +
</td></tr></table>
  
<P>
+
==== Raise, lower and align elements ====
To add a map legend or a scalebar, click the mActionAddLegendAdd new legend or
+
mActionScaleBarAdd 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.
+
  
<P>
 
 
<DIV ALIGN="CENTER"><A NAME="fig:print_composer_tab1"></A><A NAME="subfig:print_composer_legend_item"></A><A NAME="subfig:print_composer_scalebar_item"></A><A NAME="139"></A>
 
<TABLE>
 
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
 
Customize print composer legend and scalebar </CAPTION>
 
<TR><TD>
 
<DIV ALIGN="CENTER">
 
 
</DIV>  [legend item tab] [clip=true, width=0.4]print_composer_legend_item
 
  [scalebar item tab] [clip=true, width=0.4]print_composer_scalebar_item</TD></TR>
 
</TABLE>
 
</DIV>
 
 
<P>
 
 
<H3>
 
Raise, lower and align elements
 
</H3>
 
 
<P>
 
 
Raise or lower functionalities for elements are inside the
 
Raise or lower functionalities for elements are inside the
mActionRaiseItemsRaise selected items pulldown menu. Choose an
+
{{Template:ToolBtnTwo|mActionRaiseItems|Raise selected items}} pulldown menu. Choose an
 
element on the print composer canvas and select the matching functionality to
 
element on the print composer canvas and select the matching functionality to
 
raise or lower the selected element compared to the other elements (see
 
raise or lower the selected element compared to the other elements (see
table&nbsp;<A HREF="node1.html#tab:printcomposer_tools">4</A>).  
+
table~[[tab:printcomposer_tools]]).  
  
<P>
 
 
There are several alignment functionalities available within the
 
There are several alignment functionalities available within the
mActionAlignLeftAlign selected items pulldown menu (see
+
{{Template:ToolBtnTwo|mActionAlignLeft|Align selected items}} pulldown menu (see
table&nbsp;<A HREF="node1.html#tab:printcomposer_tools">4</A>). To use an alignment functionality , you
+
table~[[tab:printcomposer_tools]]). To use an alignment functionality , you
 
first select some elements and then click on the matching alignment icon. All
 
first select some elements and then click on the matching alignment icon. All
 
selected will then be aligned within to their common bounding box.       
 
selected will then be aligned within to their common bounding box.       
  
<P>
+
==== Creating Output ====
  
<H3>
+
Figure [[fig:print_composer_complete]] shows the print composer with an example  
Creating Output
+
</H3>
+
 
+
<P>
+
Figure <A HREF="#fig:print_composer_complete">41</A> 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.
  
<P>
+
<table align='center'>
 +
<caption>'''Figure xx:''' Print Composer with map view, legend, scalebar, and text added {{Template:Nix</caption>
 +
<tr><td>}caption}
 +
  <span id='fig:print_composer_complete'></span>
 +
  [[File:print_composer_complete.png|740px]]</td></tr></table>
  
<DIV ALIGN="CENTER"><A NAME="fig:print_composer_complete"></A><A NAME="157"></A>
 
<TABLE>
 
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
 
Print Composer with map view, legend, scalebar, and text added </CAPTION>
 
<TR><TD>
 
<DIV ALIGN="CENTER">
 
</DIV>
 
<P></P>
 
<DIV ALIGN="CENTER">  [clip=true, width=]print_composer_complete
 
 
</DIV></TD></TR>
 
</TABLE>
 
</DIV>
 
 
<P>
 
 
The print composer allows you to create several output formats and it is possible to  
 
The print composer allows you to create several output formats and it is possible to  
 
define the resolution (print quality) and paper size:
 
define the resolution (print quality) and paper size:
  
<P>
+
<ul>
 
+
<li>The {{Template:ToolBtnTwo|mActionFilePrint|Print}} icon allows to print the layout  
<UL>
+
<LI>The mActionFilePrintPrint icon allows to print the layout  
+
 
to a connected printer or as PDF or Postscript file depending on installed printer  
 
to a connected printer or as PDF or Postscript file depending on installed printer  
 
drivers.
 
drivers.
</LI>
+
<li>The {{Template:ToolBtnTwo|mActionExportMapServer|Export as image}} icon exports the  
<LI>The mActionExportMapServerExport as image icon exports the  
+
 
composer canvas in several image formats such as PNG, BPM, TIF, JPG, ...
 
composer canvas in several image formats such as PNG, BPM, TIF, JPG, ...
</LI>
+
<li>The {{Template:ToolBtnTwo|mActionSaveAsSVG|Export as SVG}} icon saves the print  
<LI>The mActionSaveAsSVGExport as SVG icon saves the print  
+
composer canvas as a SVG (Scalable Vector Graphic). '''Note:''' Currently the  
composer canvas as a SVG (Scalable Vector Graphic). <SPAN  CLASS="textbf">Note:</SPAN> Currently the  
+
 
SVG output is very basic. This is not a QGIS problem, but a problem of the underlaying  
 
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.
 
Qt library. This will hopefully be sorted out in future versions.
</LI>
+
</ul>
</UL>
+
  
<H3>
+
==== Saving and loading a print composer layout ====
Saving and loading a print composer layout
+
</H3>
+
  
<P>
+
With the {{Template:ToolBtnTwo|mActionFileSaveAs|Save as template}} and
With the mActionFileSaveAsSave as template and
+
{{Template:ToolBtnTwo|mActionFolder|Load from template}} icons you can save the current
mActionFolderLoad from template icons you can save the current
+
 
state of a print composer session as a  *.qpt template and load the template
 
state of a print composer session as a  *.qpt template and load the template
 
again in another session.
 
again in another session.

2009年10月5日 (月) 01:04時点における版

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~tab:printcomposer_tools:

Table xx: Print Composer Tools
Icon Purpose Icon Purpose
MActionFolder.png Load from template MActionFileSaveAs.png Save as template
MActionExportMapServer.png Export to an image format MActionSaveAsSVG.png Export print composition to SVG
MActionFilePrint.png Print or export as PDF or Postscript MActionZoomFullExtent.png Zoom to full extend
MActionZoomIn.png Zoom in MActionZoomOut.png Zoom out
MActionDraw.png Refresh view MActionAddRasterLayer.png Add new map from QGIS map canvas
MActionSaveMapAsImage.png Add Image to print composition MActionLabel.png Add label to print composition
MActionAddLegend.png Add new legend to print composition MActionScaleBar.png Add new scalebar to print composition
MActionSelectPan.png Select/Move item in print composition MActionMoveItemContent.png Move content within an item
MActionGroupItems.png Group items of print composition MActionUngroupItems.png Ungroup items of print composition
MActionRaiseItems.png Raise selected items MActionLowerItems.png Lower selected items
MActionMoveItemsToTop.png Move selected items to top MActionMoveItemsToBottom.png Move selected items to bottom
MActionAlignLeft.png Align selected items left MActionAlignRight.png Align selected items right
MActionAlignHCenter.png Align selected items center MActionAlignVCenter.png Align selected items center vertical
MActionAlignTop.png Align selected items top MActionAlignBottom.png Align selected items bottom

To access the print composer, click on the MActionFilePrint.png Print button in the toolbar or choose File > MActionFilePrint.png 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 MActionFilePrint.png Print Composer icon.

Figure xx: Print Composer {{Template:Nix
}caption} Print composer blank.png

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 fig:print_composer_blank shows the initial view of the print composer with an activated CheckBox.pngSnap 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 CheckBox.pngSnap to grid feature only works, if you define a grid resolution > 0. Furthermore you can also activate the CheckBox.pngPrint 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 MActionSelectPan.png 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 MActionAddRasterLayer.png 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 SelectString.png is the default setting. It only displays an empty box with a message "Map will be printed here".
  • Preview Cache SelectString.png 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 SelectString.png 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.
Figure xx: Print Composer map item tab content {{Template:Nix
}caption}
(x) Width, height and extend dialog
Print composer map item1.png
(x) Properties dialog
Print composer map item2.png

You can resize the map later by clicking on the MActionSelectPan.png 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 CheckBox.pngframe checkbox (see Figure~fig:print_composer_map_item). 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~fig:print_composer_map_item).

To move layers within the map element select the map element, click the MActionMoveItemContent.png Move item content icon and move the layers within the map element frame with the left mouse button.

Navigation tools

For map navigation the print composer provides 4 general tools:

  • MActionZoomOut.png Zoom in,
  • MActionZoomOut.png Zoom out,
  • MActionZoomFullExtent.png Zoom to full extend and
  • MActionDraw.png 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 MActionLabel.png Add label or MActionSaveMapAsImage.png 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.

Figure xx: Customize print composer label and images {{Template:Nix
}caption}
(x) label item tab
Print composer label item.png
(x) image item tab
Print composer image item.png
Legend and scalebar

To add a map legend or a scalebar, click the MActionAddLegend.png Add new legend or MActionScaleBar.png 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.

Figure xx: Customize print composer legend and scalebar {{Template:Nix
}caption}
(x) legend item tab
Print composer legend item.png
(x) scalebar item tab
Print composer scalebar item.png

Raise, lower and align elements

Raise or lower functionalities for elements are inside the MActionRaiseItems.png 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~tab:printcomposer_tools).

There are several alignment functionalities available within the MActionAlignLeft.png Align selected items pulldown menu (see table~tab:printcomposer_tools). 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 fig:print_composer_complete shows the print composer with an example print layout including each type of map element described in the sections above.

Figure xx: Print Composer with map view, legend, scalebar, and text added {{Template:Nix
}caption}
  
Print composer complete.png

The print composer allows you to create several output formats and it is possible to define the resolution (print quality) and paper size:

  • The MActionFilePrint.png Print icon allows to print the layout to a connected printer or as PDF or Postscript file depending on installed printer drivers.
  • The MActionExportMapServer.png Export as image icon exports the composer canvas in several image formats such as PNG, BPM, TIF, JPG, ...
  • The MActionSaveAsSVG.png 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 MActionFileSaveAs.png Save as template and MActionFolder.png 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.