Printing a webpage with canvas

I am using canvas on this project I am working on to allow users to add their signature. I am having a very hard time printing this canvas signature out on paper. Using Google Chrome, the canvas appears nicely in print preview, but does not appear at all on the printed out paper.

I read that in some cases using toDataURL and replacing the canvas area with an image, solves the printout problem. However, in my case, doing so did not solve the problem. I was wondering if there is any alternate solution to this issue.

I appreciate any advice.

Many thanks in advance!

This is what I tried:

    var sktch = $('#simple_sketch').sketch();
    var cleanCanvas = $('#simple_sketch')[0];

         /* replace canvas with image */
         var canvas = document.getElementById("simple_sketch");
         var img    = canvas.toDataURL("image/png");
        document.getElementById("signature").value = document.getElementById("simple_sketch").toDataURL("image/png");
         $('#simple_sketch').replaceWith('<img style="border-bottom:2px solid black;" src="'+img+'"/>');


Need Your Help

Attribute lost when rendering the object to view in Flask

python flask

This is a rather silly issue but I stepped through the function but couldn't figure out what was causing the issue.

Android NDK is crystaX the way to go for wchar support?

android c++ android-ndk jni

I need advice about wchar on android. Is crystax compilation supported for Android Marketplace? Also does the WCHAR support now include comparison operators like wcscmp? I've got wchar* , const w...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.