You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PDF.js seems to assume that the canvas size is unlimited.
As demonstrated by #6385, this is not true. In that bug, a specific system using IE11 with HWA enabled supported canvases of at most 2048x2048 (#6385 (comment)).
Other browsers / systems have more generous limits, but there are probably images (e.g. high-res scans?) that exceeds these boundaries. In these cases, we should still be able to display the image in some way.
Slicing the canvas seems a solution, but that might be a bit tricky with gradients.
In IE, feature detection seems possible using canvas.toDataURL & img.naturalWidth & img.naturalHeight. In Chrome, toDataURL. I haven't checked Firefox or Safari yet, but detection can probably be done in a similar way.
So, how should we tackle big canvases?
The text was updated successfully, but these errors were encountered:
Yury talked about canvas tiling a while ago, but nobody has further investigated or implemented that. I think the idea is to split the one large canvas into multiple smaller canvases, though I would not really have an idea on how to implement that properly.
/cc @yurydelendik (who can probably add more to this issue than I can)
PDF.js seems to assume that the canvas size is unlimited.
As demonstrated by #6385, this is not true. In that bug, a specific system using IE11 with HWA enabled supported canvases of at most 2048x2048 (#6385 (comment)).
Other browsers / systems have more generous limits, but there are probably images (e.g. high-res scans?) that exceeds these boundaries. In these cases, we should still be able to display the image in some way.
Slicing the canvas seems a solution, but that might be a bit tricky with gradients.
In IE, feature detection seems possible using canvas.toDataURL & img.naturalWidth & img.naturalHeight. In Chrome, toDataURL. I haven't checked Firefox or Safari yet, but detection can probably be done in a similar way.
So, how should we tackle big canvases?
The text was updated successfully, but these errors were encountered: