2
0

pdf.js 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /**
  2. * @licstart The following is the entire license notice for the
  3. * Javascript code in this page
  4. *
  5. * Copyright 2017 Mozilla Foundation
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. *
  19. * @licend The above is the entire license notice for the
  20. * Javascript code in this page
  21. */
  22. 'use strict';
  23. var pdfjsVersion = '2.0.250';
  24. var pdfjsBuild = '6b2ed504';
  25. var pdfjsSharedUtil = require('./shared/util.js');
  26. var pdfjsDisplayGlobal = require('./display/global.js');
  27. var pdfjsDisplayAPI = require('./display/api.js');
  28. var pdfjsDisplayTextLayer = require('./display/text_layer.js');
  29. var pdfjsDisplayAnnotationLayer = require('./display/annotation_layer.js');
  30. var pdfjsDisplayDOMUtils = require('./display/dom_utils.js');
  31. var pdfjsDisplaySVG = require('./display/svg.js');
  32. {
  33. if (pdfjsSharedUtil.isNodeJS()) {
  34. var PDFNodeStream = require('./display/node_stream.js').PDFNodeStream;
  35. pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFNodeStream);
  36. } else if (typeof Response !== 'undefined' && 'body' in Response.prototype && typeof ReadableStream !== 'undefined') {
  37. var PDFFetchStream = require('./display/fetch_stream.js').PDFFetchStream;
  38. pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFFetchStream);
  39. } else {
  40. var PDFNetworkStream = require('./display/network.js').PDFNetworkStream;
  41. pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFNetworkStream);
  42. }
  43. }
  44. exports.PDFJS = pdfjsDisplayGlobal.PDFJS;
  45. exports.build = pdfjsDisplayAPI.build;
  46. exports.version = pdfjsDisplayAPI.version;
  47. exports.getDocument = pdfjsDisplayAPI.getDocument;
  48. exports.LoopbackPort = pdfjsDisplayAPI.LoopbackPort;
  49. exports.PDFDataRangeTransport = pdfjsDisplayAPI.PDFDataRangeTransport;
  50. exports.PDFWorker = pdfjsDisplayAPI.PDFWorker;
  51. exports.renderTextLayer = pdfjsDisplayTextLayer.renderTextLayer;
  52. exports.AnnotationLayer = pdfjsDisplayAnnotationLayer.AnnotationLayer;
  53. exports.createPromiseCapability = pdfjsSharedUtil.createPromiseCapability;
  54. exports.PasswordResponses = pdfjsSharedUtil.PasswordResponses;
  55. exports.InvalidPDFException = pdfjsSharedUtil.InvalidPDFException;
  56. exports.MissingPDFException = pdfjsSharedUtil.MissingPDFException;
  57. exports.SVGGraphics = pdfjsDisplaySVG.SVGGraphics;
  58. exports.NativeImageDecoding = pdfjsSharedUtil.NativeImageDecoding;
  59. exports.UnexpectedResponseException = pdfjsSharedUtil.UnexpectedResponseException;
  60. exports.OPS = pdfjsSharedUtil.OPS;
  61. exports.UNSUPPORTED_FEATURES = pdfjsSharedUtil.UNSUPPORTED_FEATURES;
  62. exports.createValidAbsoluteUrl = pdfjsSharedUtil.createValidAbsoluteUrl;
  63. exports.createObjectURL = pdfjsSharedUtil.createObjectURL;
  64. exports.removeNullCharacters = pdfjsSharedUtil.removeNullCharacters;
  65. exports.shadow = pdfjsSharedUtil.shadow;
  66. exports.createBlob = pdfjsSharedUtil.createBlob;
  67. exports.RenderingCancelledException = pdfjsDisplayDOMUtils.RenderingCancelledException;
  68. exports.getFilenameFromUrl = pdfjsDisplayDOMUtils.getFilenameFromUrl;
  69. exports.addLinkAttributes = pdfjsDisplayDOMUtils.addLinkAttributes;