viewer.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. <!DOCTYPE html>
  2. <!--
  3. Copyright 2012 Mozilla Foundation
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. Adobe CMap resources are covered by their own copyright but the same license:
  14. Copyright 1990-2015 Adobe Systems Incorporated.
  15. See https://github.com/adobe-type-tools/cmap-resources
  16. -->
  17. <html dir="ltr" mozdisallowselectionprint moznomarginboxes>
  18. <head>
  19. <meta charset="utf-8">
  20. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  21. <meta name="google" content="notranslate">
  22. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  23. <title>我的合同</title>
  24. <link rel="stylesheet" href="viewer.css">
  25. <style>
  26. .download-link{
  27. position: fixed;
  28. left:0;
  29. right:0;
  30. bottom:0;
  31. height: 42px;
  32. line-height: 42px;
  33. text-align: center;
  34. color: #fff;
  35. font-size: 16px;
  36. font-weight: bold;
  37. background:linear-gradient(270deg,rgba(22,169,255,1) 0%,rgba(26,201,255,1) 100%);
  38. text-align: center;
  39. }
  40. </style>
  41. <script src="compatibility.js"></script>
  42. <!-- This snippet is used in production (included from viewer.html) -->
  43. <link rel="resource" type="application/l10n" href="locale/locale.properties">
  44. <script src="l10n.js"></script>
  45. <script src="../build/pdf.js"></script>
  46. <script src="viewer.js"></script>
  47. </head>
  48. <body tabindex="1" class="loadingInProgress" style="background-color: #fff;">
  49. <div id="outerContainer">
  50. <div id="sidebarContainer">
  51. <div id="toolbarSidebar">
  52. <div class="splitToolbarButton toggled">
  53. <button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
  54. <span data-l10n-id="thumbs_label">Thumbnails</span>
  55. </button>
  56. <button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline">
  57. <span data-l10n-id="document_outline_label">Document Outline</span>
  58. </button>
  59. <button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
  60. <span data-l10n-id="attachments_label">Attachments</span>
  61. </button>
  62. </div>
  63. </div>
  64. <div id="sidebarContent">
  65. <div id="thumbnailView">
  66. </div>
  67. <div id="outlineView" class="hidden">
  68. </div>
  69. <div id="attachmentsView" class="hidden">
  70. </div>
  71. </div>
  72. </div> <!-- sidebarContainer -->
  73. <div id="mainContainer">
  74. <div class="findbar hidden doorHanger" id="findbar">
  75. <div id="findbarInputContainer">
  76. <input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="find_input">
  77. <div class="splitToolbarButton">
  78. <button id="findPrevious" class="toolbarButton findPrevious" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="find_previous">
  79. <span data-l10n-id="find_previous_label">Previous</span>
  80. </button>
  81. <div class="splitToolbarButtonSeparator"></div>
  82. <button id="findNext" class="toolbarButton findNext" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="find_next">
  83. <span data-l10n-id="find_next_label">Next</span>
  84. </button>
  85. </div>
  86. </div>
  87. <div id="findbarOptionsContainer">
  88. <input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
  89. <label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight all</label>
  90. <input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
  91. <label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match case</label>
  92. <span id="findResultsCount" class="toolbarLabel hidden"></span>
  93. </div>
  94. <div id="findbarMessageContainer">
  95. <span id="findMsg" class="toolbarLabel"></span>
  96. </div>
  97. </div> <!-- findbar -->
  98. <div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
  99. <div id="secondaryToolbarButtonContainer">
  100. <button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode">
  101. <span data-l10n-id="presentation_mode_label">Presentation Mode</span>
  102. </button>
  103. <button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file">
  104. <span data-l10n-id="open_file_label">Open</span>
  105. </button>
  106. <button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="53" data-l10n-id="print">
  107. <span data-l10n-id="print_label">Print</span>
  108. </button>
  109. <button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download">
  110. <span data-l10n-id="download_label">Download</span>
  111. </button>
  112. <a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark">
  113. <span data-l10n-id="bookmark_label">Current View</span>
  114. </a>
  115. <div class="horizontalToolbarSeparator visibleLargeView"></div>
  116. <button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
  117. <span data-l10n-id="first_page_label">Go to First Page</span>
  118. </button>
  119. <button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
  120. <span data-l10n-id="last_page_label">Go to Last Page</span>
  121. </button>
  122. <div class="horizontalToolbarSeparator"></div>
  123. <button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw">
  124. <span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
  125. </button>
  126. <button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw">
  127. <span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
  128. </button>
  129. <div class="horizontalToolbarSeparator"></div>
  130. <button id="cursorSelectTool" class="secondaryToolbarButton selectTool toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="cursor_text_select_tool">
  131. <span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
  132. </button>
  133. <button id="cursorHandTool" class="secondaryToolbarButton handTool" title="Enable Hand Tool" tabindex="61" data-l10n-id="cursor_hand_tool">
  134. <span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
  135. </button>
  136. <div class="horizontalToolbarSeparator"></div>
  137. <button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="62" data-l10n-id="document_properties">
  138. <span data-l10n-id="document_properties_label">Document Properties…</span>
  139. </button>
  140. </div>
  141. </div> <!-- secondaryToolbar -->
  142. <div class="toolbar">
  143. <div id="toolbarContainer">
  144. <div id="toolbarViewer">
  145. <div id="toolbarViewerLeft">
  146. <button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar">
  147. <span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
  148. </button>
  149. <div class="toolbarButtonSpacer"></div>
  150. <button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar">
  151. <span data-l10n-id="findbar_label">Find</span>
  152. </button>
  153. <div class="splitToolbarButton hiddenSmallView">
  154. <button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
  155. <span data-l10n-id="previous_label">Previous</span>
  156. </button>
  157. <div class="splitToolbarButtonSeparator"></div>
  158. <button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
  159. <span data-l10n-id="next_label">Next</span>
  160. </button>
  161. </div>
  162. <input type="number" id="pageNumber" class="toolbarField pageNumber" title="Page" value="1" size="4" min="1" tabindex="15" data-l10n-id="page">
  163. <span id="numPages" class="toolbarLabel"></span>
  164. </div>
  165. <div id="toolbarViewerRight">
  166. <button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
  167. <span data-l10n-id="presentation_mode_label">Presentation Mode</span>
  168. </button>
  169. <button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
  170. <span data-l10n-id="open_file_label">Open</span>
  171. </button>
  172. <button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33" data-l10n-id="print">
  173. <span data-l10n-id="print_label">Print</span>
  174. </button>
  175. <button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download">
  176. <span data-l10n-id="download_label">Download</span>
  177. </button>
  178. <a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
  179. <span data-l10n-id="bookmark_label">Current View</span>
  180. </a>
  181. <div class="verticalToolbarSeparator hiddenSmallView"></div>
  182. <button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36" data-l10n-id="tools">
  183. <span data-l10n-id="tools_label">Tools</span>
  184. </button>
  185. </div>
  186. <div id="toolbarViewerMiddle">
  187. <div class="splitToolbarButton">
  188. <button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
  189. <span data-l10n-id="zoom_out_label">Zoom Out</span>
  190. </button>
  191. <div class="splitToolbarButtonSeparator"></div>
  192. <button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
  193. <span data-l10n-id="zoom_in_label">Zoom In</span>
  194. </button>
  195. </div>
  196. <span id="scaleSelectContainer" class="dropdownToolbarButton">
  197. <select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
  198. <option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
  199. <option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
  200. <option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Page Fit</option>
  201. <option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Page Width</option>
  202. <option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true"></option>
  203. <option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
  204. <option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
  205. <option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
  206. <option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
  207. <option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
  208. <option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
  209. <option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
  210. <option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
  211. </select>
  212. </span>
  213. </div>
  214. </div>
  215. <div id="loadingBar">
  216. <div class="progress">
  217. <div class="glimmer">
  218. </div>
  219. </div>
  220. </div>
  221. </div>
  222. </div>
  223. <menu type="context" id="viewerContextMenu">
  224. <menuitem id="contextFirstPage" label="First Page"
  225. data-l10n-id="first_page"></menuitem>
  226. <menuitem id="contextLastPage" label="Last Page"
  227. data-l10n-id="last_page"></menuitem>
  228. <menuitem id="contextPageRotateCw" label="Rotate Clockwise"
  229. data-l10n-id="page_rotate_cw"></menuitem>
  230. <menuitem id="contextPageRotateCcw" label="Rotate Counter-Clockwise"
  231. data-l10n-id="page_rotate_ccw"></menuitem>
  232. </menu>
  233. <div id="viewerContainer" tabindex="0">
  234. <div id="viewer" class="pdfViewer"></div>
  235. </div>
  236. <div id="errorWrapper" hidden='true'>
  237. <div id="errorMessageLeft">
  238. <span id="errorMessage"></span>
  239. <button id="errorShowMore" data-l10n-id="error_more_info">
  240. More Information
  241. </button>
  242. <button id="errorShowLess" data-l10n-id="error_less_info" hidden='true'>
  243. Less Information
  244. </button>
  245. </div>
  246. <div id="errorMessageRight">
  247. <button id="errorClose" data-l10n-id="error_close">
  248. Close
  249. </button>
  250. </div>
  251. <div class="clearBoth"></div>
  252. <textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
  253. </div>
  254. </div> <!-- mainContainer -->
  255. <div id="overlayContainer" class="hidden">
  256. <div id="passwordOverlay" class="container hidden">
  257. <div class="dialog">
  258. <div class="row">
  259. <p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
  260. </div>
  261. <div class="row">
  262. <input type="password" id="password" class="toolbarField">
  263. </div>
  264. <div class="buttonRow">
  265. <button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
  266. <button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
  267. </div>
  268. </div>
  269. </div>
  270. <div id="documentPropertiesOverlay" class="container hidden">
  271. <div class="dialog">
  272. <div class="row">
  273. <span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p>
  274. </div>
  275. <div class="row">
  276. <span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p>
  277. </div>
  278. <div class="separator"></div>
  279. <div class="row">
  280. <span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p>
  281. </div>
  282. <div class="row">
  283. <span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p>
  284. </div>
  285. <div class="row">
  286. <span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p>
  287. </div>
  288. <div class="row">
  289. <span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p>
  290. </div>
  291. <div class="row">
  292. <span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
  293. </div>
  294. <div class="row">
  295. <span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
  296. </div>
  297. <div class="row">
  298. <span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
  299. </div>
  300. <div class="separator"></div>
  301. <div class="row">
  302. <span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
  303. </div>
  304. <div class="row">
  305. <span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
  306. </div>
  307. <div class="row">
  308. <span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
  309. </div>
  310. <div class="buttonRow">
  311. <button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
  312. </div>
  313. </div>
  314. </div>
  315. <div id="printServiceOverlay" class="container hidden">
  316. <div class="dialog">
  317. <div class="row">
  318. <span data-l10n-id="print_progress_message">Preparing document for printing…</span>
  319. </div>
  320. <div class="row">
  321. <progress value="0" max="100"></progress>
  322. <span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' class="relative-progress">0%</span>
  323. </div>
  324. <div class="buttonRow">
  325. <button id="printCancel" class="overlayButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. </div> <!-- outerContainer -->
  331. <div id="printContainer"></div>
  332. <!-- <div class="download-link" id="download-link"> -->
  333. <!-- <a href="https://dakaname.oss-cn-hangzhou.aliyuncs.com/file/2018-12-28/1546003237411.pdf" download="电子保单"> -->
  334. <!-- <div>下载我的电子保单</div> -->
  335. <!-- </a> -->
  336. <!-- </div> -->
  337. <script>
  338. document.getElementById("download-link").onclick=function(){
  339. console.log('download');
  340. // var downloadUrl=sessionStorage.getItem('queryUrl');
  341. var downloadUrl='https://dakaname.oss-cn-hangzhou.aliyuncs.com/file/2018-12-28/1546003237411.pdf';
  342. window.open(downloadUrl);
  343. }
  344. </script>
  345. </body>
  346. </html>