This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to print OSM to pdf using java

0

I'm new to OSM can anyone tell me how can i print a OSM to pdf file, i have found a printservlet.war file in the mapfish website i have downloaded it and placed it in my tomcat folder and run the server, when i make a request to print

org.mapfish.print.InvalidJsonValueException: spec.layers[0].type has an invalid value: OSM

Then i get the above exception, is it a correct way or anyone please point me in the right direction.

asked 13 Sep '13, 07:34

Lokesh39's gravatar image

Lokesh39
11112
accept rate: 0%

edited 13 Sep '13, 11:45


One Answer:

0

As a quick investigation, it seems that mapfish supports osm tiles:

http://www.mapfish.org/doc/print/protocol.html#layers-params

Your may have a version problem (older library) or a case sensitivity problem ('OSM' and not 'osm') ?

Also be careful that OSM has limited resources and a tile usage policy:

https://wiki.openstreetmap.org/wiki/Tile_usage_policy

answered 13 Sep '13, 09:35

Pieren's gravatar image

Pieren
9.8k2083157
accept rate: 15%

@Pieren thanks for the reply, i have gone through layers-params but that didn't help....is there any other way excluding mapfish to print OSM using java from my tomcat server

(14 Sep '13, 07:33) Lokesh39
1

maybe a solution or a helpful link is hidden at https://wiki.openstreetmap.org/wiki/Frameworks ?

(16 Sep '13, 16:48) stephan75

Source code available on GitHub .