javascript - Printing a webpage with canvas -


i using canvas on project working on allow users add signature. having hard time printing canvas signature out on paper. using google chrome, canvas appears nicely in print preview, not appear @ on printed out paper.

i read in cases using todataurl , replacing canvas area image, solves printout problem. however, in case, doing did not solve problem. wondering if there alternate solution issue.

i appreciate advice.

many in advance!

this tried:

    var sktch = $('#simple_sketch').sketch();     var cleancanvas = $('#simple_sketch')[0];      $('.save-signature').click(function(){          /* replace canvas image */          var canvas = document.getelementbyid("simple_sketch");          var img    = canvas.todataurl("image/png");          $('.signature-buttons').replacewith('');         document.getelementbyid("signature").value = document.getelementbyid("simple_sketch").todataurl("image/png");          $('#simple_sketch').replacewith('<img style="border-bottom:2px solid black;" src="'+img+'"/>');     }); 


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -