Printing 1.7.x HOWTO

The MapFish printing community module was originally for the GS2.0 series, but now is backported to GS1.7.x.

Installation

There are two ways to try out the printing module--- either build the server yourself or install some JARs into a nightly build.

Method 1: Adding the printing module to a nightly build

Warning: this method involves a healthy amount of surgery on GeoServer. It might break at some point, too.

  1. Grab a copy of the nightly build of GeoServer's 1.7.x series.  Install it per instructions.
  2. Grab printing-nightly-1.7.zip, which has the necessary library files to add the printing functionality to GeoServer.
  3. Extract the zip you just downloaded to the root directory of the nightly you just installed, or manually extract all the JARs to $GEOSERVER_HOME/webapps/geoserver/WEB-INF/lib and web.xml to $GEOSERVER_HOME/webapps/geoserver/WEB-INF/.
  4. Navigate to $GEOSERVER_HOME/webapps/geoserver/WEB-INF/lib and delete itext-2.0.6.jar and commons-httpclient-2.0.jar.
  5. Install the configuration & example application as documented below.
  6. Start GeoServer as described in $GEOSERVER_HOME/RUNNING.txt, or by running bin/startup.sh from $GEOSERVER_HOME.
  7. The example printing application will be available at http://localhost:8080/geoserver/www/mf/examples/print/simple.html.

Method 2: Building GeoServer with the printing module (DOES NOT WORK AS OF NOW):

All changes to the GeoServer 1.7.x trunk necessary for printing to work properly have not been made (though if you're really ambitious, you can make the necessary changes yourself). When they are, do this:

  1. Check out or update the trunk.
  2. Navigate to the src/ directory in your copy of the trunk.
  3. Run this command:
    mvn clean install -Pprinting
  4. Install the configuration & example application as documented below.
  5. Start the server by navigating to the src/community/web2/app subdirectory of the GeoServer trunk and then running this command, with the command updated to reflect your data directory:
    mvn jetty:run -Pprinting -DGEOSERVER_DATA_DIR=[YOUR_DATA_DIR]
  6. The example printing application will be available at http://localhost:8080/geoserver/www/mf/examples/print/simple.html.

Installing the default configuration and an example application:

  1. Grab the sample configuration & interface, attached to this document as printing-data.zip.  Extract it to the root of your GeoServer data directory, $GEOSERVER_DATA_DIR.
  2. If you would like to modify the MapFish configuration, its documentationis available.  This allows you to grab data from other sources than localhost and change the appearance of printed documents.

Configuration

See the information on the 2.0 version.

Added by Alan Gerber, last edited by Alan Gerber on Jul 30, 2009  (view change)
View Attachments (2) Info