singlepageviewer.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!DOCTYPE html>
  2. <!--
  3. Copyright 2014 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. -->
  14. <html dir="ltr" mozdisallowselectionprint>
  15. <head>
  16. <meta charset="utf-8">
  17. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  18. <meta name="google" content="notranslate">
  19. <title>PDF.js Single Page Viewer using built components</title>
  20. <style>
  21. body {
  22. background-color: #808080;
  23. margin: 0;
  24. padding: 0;
  25. }
  26. #viewerContainer {
  27. overflow: auto;
  28. position: absolute;
  29. width: 100%;
  30. height: 100%;
  31. }
  32. </style>
  33. <link rel="stylesheet" href="../../node_modules/pdfjs-dist/web/pdf_viewer.css">
  34. <script src="../../node_modules/pdfjs-dist/build/pdf.js"></script>
  35. <script src="../../node_modules/pdfjs-dist/web/pdf_viewer.js"></script>
  36. </head>
  37. <body tabindex="1">
  38. <div id="viewerContainer">
  39. <div id="viewer" class="pdfViewer"></div>
  40. </div>
  41. <script src="singlepageviewer.js"></script>
  42. </body>
  43. </html>