Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF and PNG have different outputs (zoom levels) #97

Open
Falke-Design opened this issue Sep 11, 2023 · 1 comment
Open

PDF and PNG have different outputs (zoom levels) #97

Falke-Design opened this issue Sep 11, 2023 · 1 comment

Comments

@Falke-Design
Copy link

PDF has no housenumbers, and less icons. For me it looks like the PDF is generated on a lower zoom level.

https://print.get-map.org/maps/294517

PNG:
grafik

PDF:
grafik

@hholzgra
Copy link
Owner

All the vector formats are created using the default DPI settings from which the Mapnik renderer then determines the zoom factor. (not sure whether that is 72 or 96 dpi right now)

When rendering bitmaps I bump up the resolution to 300dpi as long as the total image size allows for that (there is a 32 000 x 32 000 limit in the underlying Cairo graphics library), and fall back to the default resolution when things get too big otherwise.

Unfortunately bumping up the resolution sometimes leads to weird side effects that I wasn't so far file a good minimal reproducing Mapnik renderer bug report for: #62

The solution for higher resolution PDFs I use so far is to render for a larger paper format, then scale it down when printing.

I may actually want to re-visit that idea and change the default DPI for PDFs to a higher value, too (assuming that it is possible not only for bitmap formats which I have to verify first)

@hholzgra hholzgra changed the title PDF and PNG have different outputs PDF and PNG have different outputs (zoom levels) Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants