title: How to export an image or PDF from a Processing Javascript mode sketch?
body: <p>Processing 2 'Java mode', previously known as 'standard mode', has some easy options to output graphics like
  <a href="http://processing.org/reference/saveFrame_.html" rel="nofollow">saveFrame()</a> or the <a href="http://processing.org/reference/libraries/pdf/index.html" rel="nofollow">PDF Export Library</a>. </p>
  
  <p>Now, the web friendly 'Javascript mode' (based on the <a href="http://processingjs.org/" rel="nofollow">Processing.js</a> project) allows one to host a sketch easily (by way of HTML canvas), but I can't find much about file output when using it.</p>
  
  <p>How can I make my 'Javascript mode' sketch save SVG or PDF? </p>
  
  <p>(Unfortunatly I don't know Javascript, so the answer might not assume knowledge of it)</p>