HTML2Canvas does not display in new window <p>I have tried to display the contents of the body tag in HTML using the following code</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src="jspdf.debug.js"&gt;&lt;/script&gt; &lt;script src="//cdn.rawgit.com/niklasvh/html2canvas/0.5.0-alpha2/dist/html2canvas.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function demoFromHTML() { $('body').html2canvas(); var queue = html2canvas.Parse(); var canvas = html2canvas.Renderer(queue,{elements:{length:1}}); var img = canvas.toDataURL(); window.open(img); } &lt;/script&gt; &lt;/head&gt; &lt;body onload = "demoFromHTML();"&gt; &lt;div id="customers"&gt; &lt;table id="tab_customers" class="table table-striped" &gt; &lt;colgroup&gt; &lt;col width="20%"&gt; &lt;col width="20%"&gt; &lt;col width="20%"&gt; &lt;col width="20%"&gt; &lt;/colgroup&gt; &lt;thead&gt; &lt;tr class='warning'&gt; &lt;th&gt;Country&lt;/th&gt; &lt;th&gt;Population&lt;/th&gt; &lt;th&gt;Date&lt;/th&gt; &lt;th&gt;Age&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Chinna&lt;/td&gt; &lt;td&gt;1,363,480,000&lt;/td&gt; &lt;td&gt;March 24, 2014&lt;/td&gt; &lt;td&gt;19.1&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;India&lt;/td&gt; &lt;td&gt;1,241,900,000&lt;/td&gt; &lt;td&gt;March 24, 2014&lt;/td&gt; &lt;td&gt;17.4&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;United States&lt;/td&gt; &lt;td&gt;317,746,000&lt;/td&gt; &lt;td&gt;March 24, 2014&lt;/td&gt; &lt;td&gt;4.44&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Indonesia&lt;/td&gt; &lt;td&gt;249,866,000&lt;/td&gt; &lt;td&gt;July 1, 2013&lt;/td&gt; &lt;td&gt;3.49&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Brazil&lt;/td&gt; &lt;td&gt;201,032,714&lt;/td&gt; &lt;td&gt;July 1, 2013&lt;/td&gt; &lt;td&gt;2.81&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I tried to add the following</p> <pre><code>&lt;script src="~/Js/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script src="~/Js/html2canvas.js"&gt;&lt;/script&gt; &lt;script src="~/Js/jquery.plugin.html2canvas.js"&gt;&lt;/script&gt; </code></pre> <p>I am not able to see any output . I need to export the contents of div to PDF by taking a screenshot using HTML2Canvas. Am I doing anything wrong in this code ? </p>