A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/MatthewHerbst/react-to-print/issues/159 below:

Hidden canvas not being printed · Issue #159 · MatthewHerbst/react-to-print · GitHub

Hi!
I'm using your module to print custom components that are not displayed. I hide the component's container and pass the ref of the inner component. It works greatly, and allows me to make a print version of what is displayed.
I'm trying to print charts from chartjs lib. I put the chart in the inner component, but when I try to print, nothing happens and I got this error :

index.js:111 Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.
    at HTMLIFrameElement.f.onload (http://localhost:3000/static/js/0.chunk.js:300198:45)

Do you have any idea on how to print canvas elements that are not drawn?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4