Widget that prints the current view with the selected layers in a PDF file.
Note
This widget can’t be drawn with the drawWidget template. Instead, it must be added to one of the toolbar widgets :
Note
A mapfish PrintServer must be installed to generate the file. Full documentation is available here : Print Module Installation
Sample configuration
<pdfprint>
<name>W_MyPDFPrint</name>
<options>
<templates>
<template>
<name>Portrait</name>
<model>Letter Portrait</model>
<thumb>iconA4.jpg</thumb>
<dpi>254</dpi>
<fields>
<field>
<type>text</type>
<name>mapTitle</name>
<label>Titre</label>
</field>
</fields>
</template>
</templates>
</options>
</pdfprint>
This widget must be added to a GeoExtToolbar widget
<geoexttoolbar>
<name>W_GeoExtToolbar</name>
<options>
<widgets>
<widget>W_MyPDFPrint</widget>
</widgets>
</options>
</geoexttoolbar>
templates: | Contains <template> tags. |
---|---|
templates/template: | |
Must be in the <templates> tag. List of usable templates in the Print Servlet config file |
==== <template> options ==== :name: Name to be written under the template thumbnail. :model: Name of the corresponding layout in the config.yaml of the PrintServlet. :thumb: Path to the thumbnail of the template. :fields: Contains <field> tags. :fields/field: Must be in the <fields> tag. List of fields to insert in the template. All fields set in the config.yaml must be reflected in here. :fields/field/type: Type of the fields. May be : text, hidden, textarea :fields/field/name: Name of the field. Must be the same name in the config.yaml. :fields/field/label: Lable for the field. Will be ignored if the type was set to hidden.
fields/field/value: | |
---|---|
Default value for the field. | |
dpi: | Integer value representing the printing resolution in dots per inch; must be in the set of dpi’s allowed by the print server; if not set, default value is 96 |
widget
read