Closed zdila closed 5 years ago
Actually I can adjust PDF dimensions by setting it in mapnik.Map
constructor but I am not sure if this is correct approach comparable to the implementation in python.
Hi!
Mapnik is rendering PDF using Cairo backend. Cairo is using device-independent coordinates called user-space, where 1 point is 1/72 of inch (cairo-pdf-surface-create()
, also see Point_(typography)). PDF format is using the same coordinates. This is why you get 3.56 inch ~ 256 / 72.
Actually I can adjust PDF dimensions by setting it in mapnik.Map constructor but I am not sure if this is correct approach comparable to the implementation in python.
Yes, this is correct approach, but you have to keep in mind that you are not working with pixels in case of PDF output.
Thanks for the valuable info. It still seems that python API offers somewhat more features than nodejs (like PDF margins,...), but I think I can use what I have now :-)
Hello,
Is there a way to pring map to PDF with specified page format using nodejs bindings? So far I am only able to render a square tile to PDF which is always 3.56 × 3.56 inch with:
I've found something for python but I already use nodejs.