百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

mapfish-print

> 编程语言
开源

MapFish 的一个组件,用于打印带有模板的地图。此模块是 Java 服务器端模块。

198 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

MapFish 的一个组件,用于打印带有模板的地图。此模块是 Java 服务器端模块。

Please read the documentation available here:

Camptocamp is providing professional assistance services, open source software maintenance and new feature development for MapFish Print. Please reach us if you have any inquiry, we'd be glad to help. Every income helps float this project.

Prerequisites

Building mapfish-print requires make and Docker.

Build

Execute the following command():

> make build

This will build three artifacts: print-servlet-xxx.war, print-lib.jar, print-standalone.jar.

The build also builds the documentation in the docs/build/site folder. To deploy the documentation it should simply be copied to the gh-pages branch and then committed. GitHub will automatically build the updated site at:

If you only want to build the docs, simply run:

> ./gradlew docs:build

or run build in the docs directory.

Debug mode

To be able to quickly test modifications in the print you should:

  • Copy the file docker-compose.override.sample.yaml to docker-compose.override.yaml.
  • Run docker compose up -d, The print will be available on port 8080 and on code modification will be built and trigger a restart.

With that you will have a running print, when you modify the code the print will be rebuilt and restarted, and the debugging port will be opened on 5005.

Create new stabilization branch

  • Update CHANGELOG.md
  • Create a new branch name x.y from master.
  • Create a new label names backport x.y in the right color (GitHub: Issues -> Labels -> New Label).
  • Create a tag x.y.0.
  • On the master branch: Update the SECURITY.md file, add a policy for the new and old version.
  • On the master branch update the .github/workflows/rebuild.yaml file by adding the new branch name.
  • On the master branch update the .github/workflows/audit.yaml file by adding the new branch name.

Run from command line

The following command will run the MapFish printer. The arguments must be supplied to the -PprintArgs="..." parameter.

To list all the command line options then execute (the current directory is ./core):

> ./gradlew print -PprintArgs="-help"
> ./gradlew print -PprintArgs="-config ../examples/src/test/resources/examples/simple/config.yaml -spec ../examples/src/test/resources/examples/simple/requestData.json -output ./output.pdf"

If you want to run in debug mode you can do the following:

> ./gradlew print --debug-jvm -PprintArgs="-config ../examples/src/test/resources/examples/simple/config.yaml -spec ../examples/src/test/resources/examples/simple/requestData.json -output ./output.pdf"

For the examples that use GeoServer you should run it in the composition, then build and start the composition:

bash
make build
cp docker-compose.override.sample.yaml docker-compose.override.yaml
make acceptance-tests-up

Run the example:

bash
docker compose exec builder gradle print -PprintArgs="-config /src/examples/src/test/resources/examples/simple/config.yaml -spec /src/examples/src/test/resources/examples/simple/requestData.json -output /src/examples/output.pdf"

To use in Eclipse

Create Eclipse project metadata:

> ./gradlew eclipse

Import project into Eclipse

Run in Eclipse

  • Create new Java Run Configuration
  • Main class is org.mapfish.print.cli.Main
  • Program arguments: -config samples/config.yaml -spec samples/spec.json -output \$HOME/print.pdf

Credits

target

:

Thanks to YourKit for letting us use their Java profiler!

Published artifacts

Docker

War and jar

From JitPack repository

Releases, including various assets

Contributing

Please read our guide on contributing if you're interested in getting involved.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javageomapfishgeospatialgeotoolsgis

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言