title: jsPDF ReferenceError: window is not defined
body: <p>I need to create a PDF in Javascript. I have found the npm Package "jsPDF". I have installed "jsPDF" with <code>npm install jspdf</code>. It succesfully installed, but when I execute the fowolling code:</p>
  
  <pre><code>const jspdf = require ('jspdf');
  let doc = new jspdf();
  
  doc.setFontSize(40);
  doc.text(35, 25, 'PDF with jsPDF!');
  </code></pre>
  
  <p>I get an error which says <code>ReferenceError: window is not defined</code>.</p>
  
  <p>Do anybody know what's wrong in my code or if some imports are missing?</p>