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

Errors generated in console from within jsPDF library if PDF resolution too high for map. #485

Open
jmelott opened this issue Apr 20, 2023 · 0 comments

Comments

@jmelott
Copy link

jmelott commented Apr 20, 2023

getting an error in the console. Is there some sort of check we can do ahead of time to prevent the error or possibly even give some hint of what size they can use for the map if an error is generated? Otherwise they just have to manually keep trying smaller DPIs until one works.

For test that generates the error, I used the deprez1000 map and tried to generate a PDF at 1100 or 1200 dpi.

Error:
PdfGenerator.js:162 RangeError: Invalid string length
at Array.join ()
at M.y.private.buildDocument (jspdf.js:2999:20)
at M.y.save (jspdf.js:5842:22)
at PdfGenerator.js:148:14

Bradley's comment as of 4/20/2023 was:
The error is being generated deep within the jspdf library. It also seems to depend on the browser: several map/dpi combos that caused errors in Chrome did not cause errors in Firefox.

For now at least it's not worth the effort to fix.
Originally part of show-stopper error #474

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant