title: FlexpaperViewer issue
body: <p>I generated a json file using <strong>pdf2json</strong>; now I want to render it in html 4 using <strong>FlexpaperViewer</strong> but when I try I get an 'Uncaught TypeError: Cannot call method 'replace' of undefined.</p>
  
  <p>Here is the html: </p>
  
  <pre><code>&lt;!DOCTYPE html/&gt; 
  &lt;html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"&gt;   
      &lt;head&gt;  
          &lt;title&gt;FlexPaper&lt;/title&gt;          
          &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; 
          &lt;meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width" /&gt; 
          &lt;style type="text/css" media="screen"&gt;  
              html, body    { height:100%; } 
              body { margin:0; padding:0; overflow:auto; }    
              #flashContent { display:none; } 
          &lt;/style&gt;  
          &lt;link href="../../FlexPaper/flexpaper.css" rel="stylesheet" type="text/css" /&gt; 
          &lt;script src="../../FlexPaper/jquery-1.10.2.js" type="text/javascript"&gt;&lt;/script&gt; 
          &lt;script src="../../FlexPaper/jquery.extensions.min.js" type="text/javascript"&gt;&lt;/script&gt; 
          &lt;script src="../../FlexPaper/flexpaper.js" type="text/javascript"&gt;&lt;/script&gt; 
          &lt;script src="../../FlexPaper/flexpaper_handlers.js" type="text/javascript"&gt;&lt;/script&gt; 
          &lt;script src="../../FlexPaper/flexpaper_handlers_debug.js" type="text/javascript"&gt;&lt;/script&gt; 
          &lt;script src="../../FlexPaper/FlexPaperViewer.js" type="text/javascript"&gt;&lt;/script&gt; 
      &lt;/head&gt; 
      &lt;body&gt; 
          &lt;div id="documentViewer" class="flexpaper_viewer" style="position:absolute;left:10px;top:10px;width:770px;height:500px"&gt;&lt;/div&gt; 
  
      &lt;script type="text/javascript"&gt; 
          $(document).ready(function () { 
              $('#documentViewer').FlexPaperViewer( 
                { config: { 
                    //DOC : escape(getDocumentUrl(startDocument)), 
                    JSONFile: "../../FlexPaper/paper.js", 
                    Scale: 0.6, 
                    ZoomTransition: 'easeOut', 
                    ZoomTime: 0.5, 
                    ZoomInterval: 0.1, 
                    FitPageOnLoad: true, 
                    FitWidthOnLoad: false, 
                    FullScreenAsMaxWindow: false, 
                    ProgressiveLoading: false, 
                    MinZoomSize: 0.2, 
                    MaxZoomSize: 5, 
                    SearchMatchAll: false, 
                    RenderingOrder: 'html,html5', 
                    ViewModeToolsVisible: true, 
                    ZoomToolsVisible: true, 
                    NavToolsVisible: true, 
                    CursorToolsVisible: true, 
                    SearchToolsVisible: true, 
                    key: '***', 
                    localeDirectory: "../../FlexPaper/locale/", 
                    localeChain: 'en_US' 
                } 
                } 
              ); 
          }); 
      &lt;/script&gt; 
  
  
  &lt;/body&gt; 
  </code></pre>
  
  <p> </p>
  
  <p>Could you help me to find what I did wrong ? Thanks in advance.</p>