Zverik / Nik4

Mapnik to image export
Do What The F*ck You Want To Public License
123 stars 23 forks source link

Problem using fit route with specified format #21

Closed green-solutions closed 8 years ago

green-solutions commented 8 years ago

Hello,

we are trying to use Nik4 for exporting map pdfs witih our custom map style. Using fit route together with a specified format (in this example Din A4) we are not getting the correct mearurements:

nik4.py -a 4 --padding 10 --fit route --add-layers route /home/osm/gs_sommer_web/project.xml /var/www/osm/test.pdf --fonts /usr/share/fonts

This resulted in a pdf with the size 374,3 x 264,6,instead of 297 mm x 210 mm (landscape) Can you help us with this issue? Is there any parameter missing?

Thank you so much for your assistance

Zverik commented 8 years ago

Thanks for reporting this. Alas, it's a problem in underlying Cairo/pdf renderer, and I cannot adjust pdf page size afterwards with this script, as I do for SVG with svg-resize. Proportions should be correct though: if you scale the pdf to A4, you would get 10 mm padding and all that.