Create pdf from OpenStreetMap tiles.
mrkvon e84b6cec24 1.0.6 3 years ago
bin fix es modules and add supported node version to readme 3 years ago
lib fix help 3 years ago
.gitignore exclude xml and gpx files from git 3 years ago
README.md fix es modules and add supported node version to readme 3 years ago
package.json 1.0.6 3 years ago
yarn.lock wip export route (gpx from graphhopper.com) into pdf 3 years ago

README.md

OSM map to pdf

Generate pdf with OpenStreetMap tiles.

Install

sudo yarn global add osm2pdf
# or
sudo npm install -g osm2pdf

Use

Download a map

You need to provide boundaries of the area you want to download.

osm2pdf --north=70.923 --west=-4.373 --south=55.756 --east=27.872 --zoom=9

Download a route

You need to provide a route in gpx format. You can download it on graphhopper website. Find your route and click GPX export button.

osm2pdf --route --zoom=10 --input=path/to/route.gpx

Help

osm2pdf -h
# or
osm2pdf --help

Node compatibility

We use ECMAScript Modules which are supported since Node v8.

Use responsibly

OpenStreetMap is run by a not-for-profit foundation. This application uses resources provided by them. Please read the OSM Tile Usage Policy and follow it. Use osm2pdf responsibly and consider donating to OSM Foundation.

The authors are not affiliated with OSM Foundation.