question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Canvas area exceeds the maximum limit (width * height > 16777216)

See original GitHub issue

I am using ngx-extended-pdf-viewer in Ionic Cordova project and it is working great in Android. But in iOS pdf is not displaying and it shows only white area and top controls and I get below error in console:

Canvas area exceeds the maximum limit (width * heihgt > 16777216)

Can you please help me fix this this issue.

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
timvandermeijcommented, Aug 10, 2020

@stephanrauh I believe this is https://github.com/mozilla/pdf.js/issues/6419 if I understood the issue here correctly. Moreover, mobile browsers often have a lower limit because of this, otherwise we would exceed the maximum memory usage; see https://github.com/mozilla/pdf.js/blob/3b615e4ca369ff31e6399dea80383ffeffe96240/web/viewer_compatibility.js#L42-L48

0reactions
MianAzharcommented, Aug 10, 2020

Thank you for looking into it. I think I will have to find something else for iOS until there is a fix for it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Canvas area exceeds the maximum limit (width * height ...
We tracked down the issue and here is the reason: Safari simply cannot draw large canvas elements. The limit is set at 16.777.216...
Read more >
Canvas Area Exceeds The Maximum Limit - PQINA
We can create canvas elements that exceed 4096 pixels in width or height as long as the total amount of pixels is below...
Read more >
Maximum size of a <canvas> element - Stack Overflow
All tested browsers have limits to the height/width of canvas elements, but many browsers also limit the total area of the canvas element....
Read more >
OpenLayers 'Canvas area exceeds the maximum limit' error in ...
Canvas area exceeds the maximum limit (width * height > 16777216). If I decrease the window size again, the layers re-appear on the...
Read more >
3 dpr Canvas area exceeds the maximum limit (width * height ...
3 dpr Canvas area exceeds the maximum limit (width * height > 16777216). error:Canvas area exceeds the maximum limit (width * height >...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found