menu
more_vert

PDF.js 主页样式以及获取流

作者:dayu

--> <html dir="ltr" mozdisallowselectionprint moznomarginboxes> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="google" content="notranslate"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> <script> var DEFAULT_URL = ‘‘; var PDFData = ""; $.ajax({ type: "get", async: false, mimeType: text/plain; charset=x-user-defined, // url: ‘https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf‘, url:文件url}, success: function(data) { console.log(成功); PDFData = data; },error:function(e){ console.log(--->+e.statusText); } }); var rawLength = PDFData.length; //pdf.js-4068 解密 var array = new Uint8Array(new ArrayBuffer(rawLength)); for(i = 0; i < rawLength; i++) { array[i] = PDFData.charCodeAt(i) & 0xff; } DEFAULT_URL = array; console.log(DEFAULT_URL); </script> <title>PDF.js viewer</title> <link rel="stylesheet" href="viewer.css"> <!-- This snippet is used in production (included from viewer.html) --> <link rel="resource" type="application/l10n" href="locale/locale.properties"> <script src="l10n.js"></script> <script src="../build/pdf.js"></script> <script src="viewer.js"></script> </head> <body tabindex="1" class="loadingInProgress"> <divclass="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-data-l10n-title="Show Attachments" tabindex="4" data-l10n-title="Find" placeholder="请输入关键字..." tabindex="91" data-l10n-tabindex="92" data-l10n-tabindex="93" data-l10n-class="toolbarField" tabindex="94"> <label for="findHighlightAll" class="toolbarLabel" data-l10n-tabindex="95"> <label for="findMatchCase" class="toolbarLabel" data-l10n-data-l10n-tabindex="53" data-l10n-data-l10n-tabindex="56" data-l10n-tabindex="57" data-l10n-tabindex="58" data-l10n-tabindex="59" data-l10n-tabindex="60" data-l10n-tabindex="61" data-l10n-title="Toggle Sidebar" tabindex="11" data-l10n-title="Find in Document" tabindex="12" data-l10n-title="Previous Page"data-l10n-title="Next Page"data-l10n-value="1" size="4" min="1" tabindex="15" data-l10n-tabindex="32" data-l10n-tabindex="33" data-l10n-tabindex="34" data-l10n-tabindex="35" data-l10n-title="Tools" tabindex="36" data-l10n-title="Zoom Out" tabindex="21" data-l10n-title="Zoom In" tabindex="22" data-l10n-tabindex="23" data-l10n-value="auto" selected="selected" data-l10n-value="page-actual" data-l10n-value="page-fit" data-l10n-value="page-width" data-l10n-value="custom" disabled="disabled" hidden="true"></option> <option title="" value="0.5" data-l10n-value="0.75" data-l10n-value="1" data-l10n-value="1.25" data-l10n-value="1.5" data-l10n-value="2" data-l10n-value="3" data-l10n-value="4" data-l10n-data-l10n-data-l10n-hidden=true> Less Information </button> </div> <divdata-l10n-attribute is set via script, to prevent warnings in Firefox for all http:// documents. --> <inputclass="toolbarField"> </div> <div class="buttonRow"> <buttonclass="overlayButton"><span data-l10n-max="100"></progress> <span data-l10n-data-l10n-args={ "progress": 0 } class="relative-progress">0%</span> </div> <div class="buttonRow"> <buttonclass="overlayButton"><span data-l10n-id="print_progress_close">取消</span></button> </div> </div> </div> </div> <!-- overlayContainer --> </div> <!-- outerContainer --> <div></div> </body> </html>

PDF.js 主页样式以及获取流

原文地址:http://www.cnblogs.com/6324/p/7520835.html