[go: up one dir, main page]

Skip to content

MapFish Print allows printing maps as PDFs and is used by mapfish.org, geoserver extension and core-genet work.

License

Notifications You must be signed in to change notification settings

mapfish/mapfish-print-v2

Repository files navigation

MapFish Print V2

This project is no longer actively maintained by camptocamp. New projects are strongly encouraged to use mapfish-print which is at Version 3 at the time of writing.

This project is no longer fully functional, consisting of mapfish-print-lib.jar distribution used by downstream projects as described below.

MapFish Print 2.3 documentation

Background

Downstream projects making use of this technology:

  • geoserver - Uses mapfish-print-lib for gs-printing extension
  • core-geonetwork - uses mapfish-print-lib for activities such as thumbnail generation
  • GeoNode - mapfish-print-lib via geoserver printing extension
  • MapStore - mapfish-print-lib via geoserver printing extension

GeoCat BV has mained this series as needed to support the core-geonetwork project:

  • Updated to migrate to OpenPDF

GeoSolutions created a fork of the project in 2013:

  • https://github.com/geosolutions-it/mapfish-print
  • Some features introduced over time (see wiki )
  • Updated to reflect GeoTools changes including Java 11 and Log4j changes
  • This work has been incorporated back into mapfish-print-lib for 2.3.0 release
  • With GeoNode and MapStore successfully migrating to mapfish-print-lib this fork has concluded.

Outdated documentation:

Maven Build

Standard maven build targets are available:

  1. To clean the target/ folder:

    mvn clean
  2. To compile:

    mvn compile
  3. To create a print-lib-2.x-SNAPSHOT.jar jar:

    mvn package
  4. To install SNAPSHOT jar into ~/.m2/repository local maven repository:

    mvn install

    The use of a local maven repository allows for integration testing with other builds.

IDE Build

To build in IntelliJ:

  1. Open as a maven project.

To build in Eclipse:

  1. Open as maven project.

To build in Eclipse as a Java project:

  1. Create eclipse project .classpath and .project files:

    mvn eclipse:eclipse
  2. Import project into Eclipse as a Java project.

When running in an IDE:

  1. Main class is org.mapfish.print.ShellMapPrinter

  2. Program arguments: --config=samples/config.yaml --spec=samples/spec.json --output=$HOME/print.pdf

Deploy

To deploy SNAPSHOT to repo.osgeo.org:

mvn deploy

Your ~/.m2/settings.xml requires credentials to access osgeo nexus server at repo.osgeo.org. See https://wiki.osgeo.org/wiki/SAC:Repo to obtain credentials:

  <servers>
    <server>
      <username>OSGEO_ID</username>
      <password>OSGEO_PASSWORD</password>
      <id>nexus</id>
    </server>
  </servers>

Docs

Uses Python3 environment for sphinx-build documentation:

pip3 install -r docs/requirements.txt
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
open _build/html/index.html

Docs are created in docs/_build/html folder.

Maven docs profile will assemble the docs into a zip bundle if docs/_build/html/index.html exists.

mvn package

Release

To create a release:

  1. Update version in pom.xml:

    <groupId>org.mapfish.print</groupId>
    <artifactId>print-lib</artifactId>
    <version>2.3.2</version>
  2. Double check ReleaseNotes.md change-log and update if ndded.

  3. Build docs:

    sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
  4. Build confirming creation of print-lib-2.3.0.jar

    mvn clean install
  5. Commit the change to pom.xml

    git add pom.xml
    git commit -m "Release 2.3.2"
  6. Deploy to osgeo nexus

    mvn deploy -DskipTests
  7. Push and tag the change:

    git push
    git tag -a release/2.3.2 -m "Release 2.3.2"
    git push origin release/2.3.0
  8. Check the release in github:

  9. Add any release-notes to the tag in GitHub.

    Upload jar and docs bundles from target folder.

  10. Update the pom.xml against to return to SNAPSHOT developmentt:

    <groupId>org.mapfish.print</groupId>
    <artifactId>print-lib</artifactId>
    <version>2.3-SNAPSHOT</version>

    And push up the change:

    git add pom.xml
    git commit -m "Development 2.3-SNAPSHOT"
    git push

About

MapFish Print allows printing maps as PDFs and is used by mapfish.org, geoserver extension and core-genet work.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages