title: Issue using doc.output() - jsPDF
body: <p>I am having an issue with using <code>jsPDF</code>.  When using <code>doc.output('datauri');</code> to open a new PDF in another window, nothing happens. </p>
  
  <p>Heres what I am doing:</p>
  
  <pre><code>       $(".email_button").click(function(){
              // LOOP THROUGH EACH CANVAS SECTION AND STORE THE DATA INTO PDF FORM USING JSPDF CONVERT 
              var canvas = $(".ifp_container_printing_15 canvas").get();
              var imgData = canvas[0].toDataURL();
              var doc = new jsPDF();
  
              doc.setFontSize(40);
              doc.text(35, 25, "Paranyan loves jsPDF");
              doc.addImage(imgData, 'png', 15, 40, 180, 160);
              doc.output('dataurlnewwindow');     //opens the data uri in new window
          });
  </code></pre>
  
  <p>Heres my sources:</p>
  
  <pre><code>&lt;script type="text/javascript" src="/printing/jsPDF-master/jspdf.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/printing/jsPDF-master/libs/png_support/zlib.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/printing/jsPDF-master/libs/png_support/png.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/printing/jsPDF-master/jspdf.plugin.addimage.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/printing/jsPDF-master/jspdf.plugin.png_support.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I am getting no errors and the image converted works completely fine and I am able to output that <code>image data url</code>.  Its only when using the <code>output</code> that nothing happens.
  Suggestions, thoughts?</p>
  
  <p>UPDATE:</p>
  
  <p>Here is what I am doing now:</p>
  
  <pre><code>        $(".email_button").click(function(){
              // LOOP THROUGH EACH CANVAS SECTION AND STORE THE DATA INTO PDF FORM USING JSPDF CONVERT 
              var canvas = $(".ifp_container_printing_15 canvas").get();
              var ctx=canvas[0].getContext("2d");
              ctx.fillRect(20,20,150,100);
              ctx.fillStyle = 'white'; // or whatever color
              ctx.fillRect(0, 0, canvas[0].height, canvas[0].width);
  
              var imgData = canvas[0].toDataURL('image/jpeg');
              console.log(imgData);
              var doc = new jsPDF();
              doc.addImage(imgData, "jpeg", 60,50);           
              doc.output('dataurlnewwindow');
          });
  </code></pre>
  
  <p>This works fine but I only get a white background with no image showing.  Suggestions?</p>
  
  <p><strong>Solved:</strong></p>
  
  <p>Along with following the answer below, if you need to fill the background of a layer(canvas) using <code>KinecticJS</code> I used the following:</p>
  
  <pre><code>var box = new Kinetic.Rect({
              width: floorObj.width,
              height: floorObj.height,
              fill: 'white',
              draggable: false,
              name: 'background'
  });
  </code></pre>
  
  <p>What happened here is.  My image is a <code>PNG</code> so by default it has a transparent background but that does not work well with transferring over to <code>jsPDF</code>  So I just created a simple layer which used the same image dimensions to create a white background.  So on rendering of <code>PDF</code> it worked perfectly.</p>