forked from geosolutions-it/MapStore
-
Notifications
You must be signed in to change notification settings - Fork 0
Print Plugin
tdipisa edited this page Oct 23, 2012
·
6 revisions
In order to enable the print plugin follow this simple steps:
-
Download GeoServer with the print plugin following the installation instruction in the official web documentation
-
Go to the:
you@prompt:~$ mapstore/mapcomposer/app/static/externals/PrintPreview/examples -
Copy the 'Arrow_North_CFCF.svg' and the 'print_header.png' files inside the following directory:
you@prompt:~$ GEOSERVER_DATA_DIR/www/print -
Copy the 'config.yaml' file inside the following directory:
you@prompt:~$ GEOSERVER_DATA_DIR/printing -
Enable the print plugin script import inside the composer.html/viewer.html files by decommenting this code fragment:
<!-- PrintPreview resources <link rel="stylesheet" type="text/css" href="externals/PrintPreview/resources/css/printpreview.css"> <script type="text/javascript" src="script/PrintPreview.js"></script> -->
GeoExt/plugins/PrintPageField.jsGeoExt/plugins/PrintProviderField.jsGeoExt/widgets/PrintMapPanel.jsplugins/Print.jsapp/static/externals/PrintPreview/lib/GeoExt.ux/PrintPreview.js
Print plugin uses Wms GetMap requests to compose the map. So the servers under basic authentication protection must have an exception to allow the geoserver instance using the print plugin functionality to send requests. Exemple configuration for Apache2:
<Location /protected>
AuthType Basic
AuthName acque-access
AuthUserFile /etc/apache2/passwd/protected
Require valid-user
Order allow,deny
Allow from 217.133.17.186 #proxy address
Satisfy any
</Location>
##Configuration
configuration exemple:
{
"ptype":"gxp_print",
"customParams":{
"outputFilename":"mapstore-print"
},
"printService":"http://192.168.1.43:8080/acque/geoserver/pdf/",
"legendPanelId":"legendPanel",
"actionTarget":{
"target":"paneltbar",
"index":4
}
}