pdfviewer.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <!DOCTYPE html>
  2. <html dir="ltr" mozdisallowselectionprint>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  6. <title>PDF.js viewer</title>
  7. <link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/pdfjs-dist-viewer-min/build/minified/web/viewer.css">
  8. <!-- This snippet is used in production (included from viewer.html) -->
  9. <link rel="resource" type="application/l10n" href="https://fastly.jsdelivr.net/npm/pdfjs-dist-viewer-min/build/minified/web/locale/locale.properties">
  10. <script src="https://fastly.jsdelivr.net/npm/pdfjs-dist/build/pdf.js"></script>
  11. <script src="https://fastly.jsdelivr.net/npm/pdfjs-dist/build/pdf.worker.js"></script>
  12. <script src="https://fastly.jsdelivr.net/gh/torappinfo/uweb/searchurl/txt/pdfviewer.js"></script>
  13. </head>
  14. <body tabindex="1">
  15. <div id="outerContainer">
  16. <div id="sidebarContainer">
  17. <div id="toolbarSidebar">
  18. <div id="toolbarSidebarLeft">
  19. <div class="splitToolbarButton toggled">
  20. <button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
  21. <span data-l10n-id="thumbs_label">Thumbnails</span>
  22. </button>
  23. <button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline">
  24. <span data-l10n-id="document_outline_label">Document Outline</span>
  25. </button>
  26. <button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
  27. <span data-l10n-id="attachments_label">Attachments</span>
  28. </button>
  29. <button id="viewLayers" class="toolbarButton" title="Show Layers (double-click to reset all layers to the default state)" tabindex="5" data-l10n-id="layers">
  30. <span data-l10n-id="layers_label">Layers</span>
  31. </button>
  32. </div>
  33. </div>
  34. <div id="toolbarSidebarRight">
  35. <div id="outlineOptionsContainer" class="hidden">
  36. <div class="verticalToolbarSeparator"></div>
  37. <button id="currentOutlineItem" class="toolbarButton" disabled="disabled" title="Find Current Outline Item" tabindex="6" data-l10n-id="current_outline_item">
  38. <span data-l10n-id="current_outline_item_label">Current Outline Item</span>
  39. </button>
  40. </div>
  41. </div>
  42. </div>
  43. <div id="sidebarContent">
  44. <div id="thumbnailView">
  45. </div>
  46. <div id="outlineView" class="hidden">
  47. </div>
  48. <div id="attachmentsView" class="hidden">
  49. </div>
  50. <div id="layersView" class="hidden">
  51. </div>
  52. </div>
  53. <div id="sidebarResizer"></div>
  54. </div> <!-- sidebarContainer -->
  55. <div id="mainContainer">
  56. <div class="findbar hidden doorHanger" id="findbar">
  57. <div id="findbarInputContainer">
  58. <input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="find_input">
  59. <div class="splitToolbarButton">
  60. <button id="findPrevious" class="toolbarButton findPrevious" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="find_previous">
  61. <span data-l10n-id="find_previous_label">Previous</span>
  62. </button>
  63. <div class="splitToolbarButtonSeparator"></div>
  64. <button id="findNext" class="toolbarButton findNext" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="find_next">
  65. <span data-l10n-id="find_next_label">Next</span>
  66. </button>
  67. </div>
  68. </div>
  69. <div id="findbarOptionsOneContainer">
  70. <input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
  71. <label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight all</label>
  72. <input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
  73. <label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match case</label>
  74. </div>
  75. <div id="findbarOptionsTwoContainer">
  76. <input type="checkbox" id="findEntireWord" class="toolbarField" tabindex="96">
  77. <label for="findEntireWord" class="toolbarLabel" data-l10n-id="find_entire_word_label">Whole words</label>
  78. <span id="findResultsCount" class="toolbarLabel hidden"></span>
  79. </div>
  80. <div id="findbarMessageContainer">
  81. <span id="findMsg" class="toolbarLabel"></span>
  82. </div>
  83. </div> <!-- findbar -->
  84. <div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
  85. <div id="secondaryToolbarButtonContainer">
  86. <button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode">
  87. <span data-l10n-id="presentation_mode_label">Presentation Mode</span>
  88. </button>
  89. <button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file">
  90. <span data-l10n-id="open_file_label">Open</span>
  91. </button>
  92. <button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="53" data-l10n-id="print">
  93. <span data-l10n-id="print_label">Print</span>
  94. </button>
  95. <button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download">
  96. <span data-l10n-id="download_label">Download</span>
  97. </button>
  98. <a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark">
  99. <span data-l10n-id="bookmark_label">Current View</span>
  100. </a>
  101. <div class="horizontalToolbarSeparator visibleLargeView"></div>
  102. <button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
  103. <span data-l10n-id="first_page_label">Go to First Page</span>
  104. </button>
  105. <button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
  106. <span data-l10n-id="last_page_label">Go to Last Page</span>
  107. </button>
  108. <div class="horizontalToolbarSeparator"></div>
  109. <button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw">
  110. <span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
  111. </button>
  112. <button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw">
  113. <span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
  114. </button>
  115. <div class="horizontalToolbarSeparator"></div>
  116. <button id="cursorSelectTool" class="secondaryToolbarButton selectTool toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="cursor_text_select_tool">
  117. <span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
  118. </button>
  119. <button id="cursorHandTool" class="secondaryToolbarButton handTool" title="Enable Hand Tool" tabindex="61" data-l10n-id="cursor_hand_tool">
  120. <span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
  121. </button>
  122. <div class="horizontalToolbarSeparator"></div>
  123. <button id="scrollVertical" class="secondaryToolbarButton scrollModeButtons scrollVertical toggled" title="Use Vertical Scrolling" tabindex="62" data-l10n-id="scroll_vertical">
  124. <span data-l10n-id="scroll_vertical_label">Vertical Scrolling</span>
  125. </button>
  126. <button id="scrollHorizontal" class="secondaryToolbarButton scrollModeButtons scrollHorizontal" title="Use Horizontal Scrolling" tabindex="63" data-l10n-id="scroll_horizontal">
  127. <span data-l10n-id="scroll_horizontal_label">Horizontal Scrolling</span>
  128. </button>
  129. <button id="scrollWrapped" class="secondaryToolbarButton scrollModeButtons scrollWrapped" title="Use Wrapped Scrolling" tabindex="64" data-l10n-id="scroll_wrapped">
  130. <span data-l10n-id="scroll_wrapped_label">Wrapped Scrolling</span>
  131. </button>
  132. <div class="horizontalToolbarSeparator scrollModeButtons"></div>
  133. <button id="spreadNone" class="secondaryToolbarButton spreadModeButtons spreadNone toggled" title="Do not join page spreads" tabindex="65" data-l10n-id="spread_none">
  134. <span data-l10n-id="spread_none_label">No Spreads</span>
  135. </button>
  136. <button id="spreadOdd" class="secondaryToolbarButton spreadModeButtons spreadOdd" title="Join page spreads starting with odd-numbered pages" tabindex="66" data-l10n-id="spread_odd">
  137. <span data-l10n-id="spread_odd_label">Odd Spreads</span>
  138. </button>
  139. <button id="spreadEven" class="secondaryToolbarButton spreadModeButtons spreadEven" title="Join page spreads starting with even-numbered pages" tabindex="67" data-l10n-id="spread_even">
  140. <span data-l10n-id="spread_even_label">Even Spreads</span>
  141. </button>
  142. <div class="horizontalToolbarSeparator spreadModeButtons"></div>
  143. <button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="68" data-l10n-id="document_properties">
  144. <span data-l10n-id="document_properties_label">Document Properties…</span>
  145. </button>
  146. </div>
  147. </div> <!-- secondaryToolbar -->
  148. <div class="toolbar">
  149. <div id="toolbarContainer">
  150. <div id="toolbarViewer">
  151. <div id="toolbarViewerLeft">
  152. <button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar" aria-expanded="false" aria-controls="sidebarContainer">
  153. <span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
  154. </button>
  155. <div class="toolbarButtonSpacer"></div>
  156. <button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar" aria-expanded="false" aria-controls="findbar">
  157. <span data-l10n-id="findbar_label">Find</span>
  158. </button>
  159. <div class="splitToolbarButton hiddenSmallView">
  160. <button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
  161. <span data-l10n-id="previous_label">Previous</span>
  162. </button>
  163. <div class="splitToolbarButtonSeparator"></div>
  164. <button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
  165. <span data-l10n-id="next_label">Next</span>
  166. </button>
  167. </div>
  168. <input type="number" id="pageNumber" class="toolbarField pageNumber" title="Page" value="1" size="4" min="1" tabindex="15" data-l10n-id="page" autocomplete="off">
  169. <span id="numPages" class="toolbarLabel"></span>
  170. </div>
  171. <div id="toolbarViewerRight">
  172. <button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
  173. <span data-l10n-id="presentation_mode_label">Presentation Mode</span>
  174. </button>
  175. <button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
  176. <span data-l10n-id="open_file_label">Open</span>
  177. </button>
  178. <button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33" data-l10n-id="print">
  179. <span data-l10n-id="print_label">Print</span>
  180. </button>
  181. <button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download">
  182. <span data-l10n-id="download_label">Download</span>
  183. </button>
  184. <a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
  185. <span data-l10n-id="bookmark_label">Current View</span>
  186. </a>
  187. <div class="verticalToolbarSeparator hiddenSmallView"></div>
  188. <button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36" data-l10n-id="tools" aria-expanded="false" aria-controls="secondaryToolbar">
  189. <span data-l10n-id="tools_label">Tools</span>
  190. </button>
  191. </div>
  192. <div id="toolbarViewerMiddle">
  193. <div class="splitToolbarButton">
  194. <button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
  195. <span data-l10n-id="zoom_out_label">Zoom Out</span>
  196. </button>
  197. <div class="splitToolbarButtonSeparator"></div>
  198. <button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
  199. <span data-l10n-id="zoom_in_label">Zoom In</span>
  200. </button>
  201. </div>
  202. <span id="scaleSelectContainer" class="dropdownToolbarButton">
  203. <select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
  204. <option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
  205. <option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
  206. <option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Page Fit</option>
  207. <option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Page Width</option>
  208. <option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true"></option>
  209. <option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
  210. <option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
  211. <option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
  212. <option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
  213. <option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
  214. <option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
  215. <option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
  216. <option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
  217. </select>
  218. </span>
  219. </div>
  220. </div>
  221. <div id="loadingBar">
  222. <div class="progress">
  223. <div class="glimmer">
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. <div id="viewerContainer" tabindex="0">
  230. <div id="viewer" class="pdfViewer"></div>
  231. </div>
  232. <div id="errorWrapper" hidden='true'>
  233. <div id="errorMessageLeft">
  234. <span id="errorMessage"></span>
  235. <button id="errorShowMore" data-l10n-id="error_more_info">
  236. More Information
  237. </button>
  238. <button id="errorShowLess" data-l10n-id="error_less_info" hidden='true'>
  239. Less Information
  240. </button>
  241. </div>
  242. <div id="errorMessageRight">
  243. <button id="errorClose" data-l10n-id="error_close">
  244. Close
  245. </button>
  246. </div>
  247. <div class="clearBoth"></div>
  248. <textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
  249. </div>
  250. </div> <!-- mainContainer -->
  251. <div id="overlayContainer" class="hidden">
  252. <div id="passwordOverlay" class="container hidden">
  253. <div class="dialog">
  254. <div class="row">
  255. <p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
  256. </div>
  257. <div class="row">
  258. <input type="password" id="password" class="toolbarField">
  259. </div>
  260. <div class="buttonRow">
  261. <button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
  262. <button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
  263. </div>
  264. </div>
  265. </div>
  266. <div id="documentPropertiesOverlay" class="container hidden">
  267. <div class="dialog">
  268. <div class="row">
  269. <span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p>
  270. </div>
  271. <div class="row">
  272. <span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p>
  273. </div>
  274. <div class="separator"></div>
  275. <div class="row">
  276. <span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p>
  277. </div>
  278. <div class="row">
  279. <span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p>
  280. </div>
  281. <div class="row">
  282. <span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p>
  283. </div>
  284. <div class="row">
  285. <span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p>
  286. </div>
  287. <div class="row">
  288. <span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
  289. </div>
  290. <div class="row">
  291. <span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
  292. </div>
  293. <div class="row">
  294. <span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
  295. </div>
  296. <div class="separator"></div>
  297. <div class="row">
  298. <span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
  299. </div>
  300. <div class="row">
  301. <span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
  302. </div>
  303. <div class="row">
  304. <span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
  305. </div>
  306. <div class="row">
  307. <span data-l10n-id="document_properties_page_size">Page Size:</span> <p id="pageSizeField">-</p>
  308. </div>
  309. <div class="separator"></div>
  310. <div class="row">
  311. <span data-l10n-id="document_properties_linearized">Fast Web View:</span> <p id="linearizedField">-</p>
  312. </div>
  313. <div class="buttonRow">
  314. <button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
  315. </div>
  316. </div>
  317. </div>
  318. <div id="printServiceOverlay" class="container hidden">
  319. <div class="dialog">
  320. <div class="row">
  321. <span data-l10n-id="print_progress_message">Preparing document for printing…</span>
  322. </div>
  323. <div class="row">
  324. <progress value="0" max="100"></progress>
  325. <span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' class="relative-progress">0%</span>
  326. </div>
  327. <div class="buttonRow">
  328. <button id="printCancel" class="overlayButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
  329. </div>
  330. </div>
  331. </div>
  332. </div> <!-- overlayContainer -->
  333. </div> <!-- outerContainer -->
  334. <div id="printContainer"></div>
  335. </body>
  336. </html>