title: PDF Annotator with JSON layers
body: <p>I am attempting to create a pdf annotator using PDF.js and a HTML5 drawing app to create a JSON file.</p>
  
  <p>Using this: <a href="https://github.com/mozilla/pdf.js/blob/master/examples/learning/prevnext.html" rel="noreferrer">https://github.com/mozilla/pdf.js/blob/master/examples/learning/prevnext.html</a></p>
  
  <p>Maybe this: <a href="http://codecanyon.net/item/html5-drawing-tools/8869338?WT.oss_phrase=&amp;WT.oss_rank=2&amp;WT.z_author=appsandsites&amp;WT.ac=search_thumb" rel="noreferrer">http://codecanyon.net/item/html5-drawing-tools/8869338?WT.oss_phrase=&amp;WT.oss_rank=2&amp;WT.z_author=appsandsites&amp;WT.ac=search_thumb</a></p>
  
  <p>to create a JSON like <a href="http://www.html5rocks.com/en/tutorials/canvas/integrating/#web" rel="noreferrer">http://www.html5rocks.com/en/tutorials/canvas/integrating/#web</a></p>
  
  <p>Any thoughts or suggestions on how to do this?  Do you think I could use PHP to create and place the file on my server?</p>
  
  <p>Direction on the best way to do this is appreciated.. what version of JSON, how to use canvas to create a file and edit it, etc</p>
  
  <p>Update, I want to lay this over PDF.js:</p>
  
  <p><a href="https://github.com/trsanders/responsive-sketchpad" rel="noreferrer">https://github.com/trsanders/responsive-sketchpad</a></p>
  
  <p>and then in PHP create a JSON file that stores the url of a PDF and the URL to the generated json/image.</p>
  
  <p><strong><em>Update 2/23</em></strong></p>
  
  <p><img src="https://i.stack.imgur.com/4Jhxv.png" alt="enter image description here"></p>
  
  <p>I found a document browser in Perl with flexpaper which lays aframework foundation for what I want to do, but does not add in drawing support.  What I was thinking is the above image.</p>
  
  <p><a href="http://eric-blue.com/2010/02/12/example-document-browser-code/" rel="noreferrer">http://eric-blue.com/2010/02/12/example-document-browser-code/</a></p>