Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print-out of a html5 canvas?

Tags:

html

canvas

I have created a simple html-based web-page consisting of a form and some text, plus a canvas. I would like to print the page including the canvas on a piece of paper, the problem is - the canvas will not show in the print-out. Is it something I have missed in how to handle the canvas? I am currently using Opera, any knowledge whether other browsers handle this better?

like image 266
tanus Avatar asked Mar 07 '11 08:03

tanus


People also ask

How do I print a canvas in HTML?

The following is the code snippet to display an HTML5 canvas element. Here canvas_voucher is ID of canvas element.To make this start functioning we need to convert the canvas into . png image URL and open it in a new browser window. Print dialog is triggered to let user print the page.

Can you print directly on canvas?

Thanks to significant advances in technology, it's now easier than ever before to print artwork, text and images onto canvas paper. There are a number of different canvas printers available, which have been designed to produce high quality prints on canvas quickly, easily and efficiently.

Can you print canvas art?

Can You Print on Canvas With an Inkjet Printer? There used to be a time when painting was the only available treatment for canvas surfaces. This is no longer the case. Now, you can create easy canvas prints at home with the right substrate and a good-quality inkjet printer.

Is HTML5 Canvas still used?

The HTML5 canvas has the potential to become a staple of the web, enjoying ubiquitous browser and platform support in addition to widespread webpage support, as nearly 90% of websites have ported to HTML5.


1 Answers

what you need to do in this case is, have a special print view, where the canvas gets replaced by an image file, which then can be printed out easily.

have a look here: Capture HTML Canvas as gif/jpg/png/pdf?

like image 141
Daniel Kutik Avatar answered Oct 04 '22 00:10

Daniel Kutik