-
Notifications
You must be signed in to change notification settings - Fork 55
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
Enhancement for the printing control #785
Comments
It is possible to obtain a higher resolution just by passing a scale parameter to html2canvas. It won't make a huge difference, but it gives a noticable bump in overall image quality. As one might expect, increasing the scale has the greatest impact on regular HTML elements like texts and logos, but it will affect the map element as well. See comparison below. Please note that the difference in the map image quality is slightly (slightly) more distinct in an actual print. This is a quick and dirty way to achieve a slightly better image quality. However, to obtain a higher resolution on the map element as well, and thus greatly improve the overall export quality, would require a bit more work than just adding a simple parameter. |
How is file size affected? |
Quite a bit. At default scale, the export above, originally an A4 PDF, weighs in at 451 kB. At 4x scale, the file size is 2447 kB. |
I can live with that if the vector features are crispy and clear, are they? |
Added a 2x screenshot to my first comment. 1080 kB as A4 PDF. And no, vector features are not crispy and clear since such features are a part of the map canvas, just like the basemap. You can tinker with this by adding |
4x gets my vote. Could it be an option for the control? |
It's a whole lot faster to just hardcode it. It's a quick fix, a temporary workaround. No point in putting too much time into it. File sizes and export/download times are acceptable, even for A3 exports. But that's just, like, my opinion. |
Then I think we should set it to 4x. At least for now. |
Good point. |
It would be nice to:
The text was updated successfully, but these errors were encountered: