MD-Anderson-Bioinformatics / NG-CHM

A dynamic, graphical environment for exploration of clustered or non-clustered heat map data in a web browser.
https://bioinformatics.mdanderson.org/main/NG-CHM-V2:Overview
GNU General Public License v2.0
10 stars 9 forks source link

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

Open jmelott opened 1 year ago

jmelott commented 1 year ago

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