pdf_viewer.component.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* Copyright 2014 Mozilla Foundation
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. import {
  16. LinkTarget,
  17. PDFLinkService,
  18. SimpleLinkService,
  19. } from "./pdf_link_service.js";
  20. import {
  21. parseQueryString,
  22. ProgressBar,
  23. RenderingStates,
  24. ScrollMode,
  25. SpreadMode,
  26. } from "./ui_utils.js";
  27. import { AnnotationLayerBuilder } from "./annotation_layer_builder.js";
  28. import { DownloadManager } from "./download_manager.js";
  29. import { EventBus } from "./event_utils.js";
  30. import { GenericL10n } from "./genericl10n.js";
  31. import { NullL10n } from "./l10n_utils.js";
  32. import { PDFFindController } from "./pdf_find_controller.js";
  33. import { PDFHistory } from "./pdf_history.js";
  34. import { PDFPageView } from "./pdf_page_view.js";
  35. import { PDFScriptingManager } from "./pdf_scripting_manager.js";
  36. import { PDFSinglePageViewer } from "./pdf_single_page_viewer.js";
  37. import { PDFViewer } from "./pdf_viewer.js";
  38. import { StructTreeLayerBuilder } from "./struct_tree_layer_builder.js";
  39. import { TextLayerBuilder } from "./text_layer_builder.js";
  40. import { XfaLayerBuilder } from "./xfa_layer_builder.js";
  41. // eslint-disable-next-line no-unused-vars
  42. const pdfjsVersion = PDFJSDev.eval("BUNDLE_VERSION");
  43. // eslint-disable-next-line no-unused-vars
  44. const pdfjsBuild = PDFJSDev.eval("BUNDLE_BUILD");
  45. class DefaultAnnotationLayerFactory {
  46. constructor() {
  47. throw new Error(
  48. "The `DefaultAnnotationLayerFactory` has been removed, " +
  49. "please use the `annotationMode` option when initializing " +
  50. "the `PDFPageView`-instance to control AnnotationLayer rendering."
  51. );
  52. }
  53. }
  54. class DefaultStructTreeLayerFactory {
  55. constructor() {
  56. throw new Error(
  57. "The `DefaultStructTreeLayerFactory` has been removed, " +
  58. "this functionality is automatically enabled when the TextLayer is used."
  59. );
  60. }
  61. }
  62. class DefaultTextLayerFactory {
  63. constructor() {
  64. throw new Error(
  65. "The `DefaultTextLayerFactory` has been removed, " +
  66. "please use the `textLayerMode` option when initializing " +
  67. "the `PDFPageView`-instance to control TextLayer rendering."
  68. );
  69. }
  70. }
  71. class DefaultXfaLayerFactory {
  72. constructor() {
  73. throw new Error(
  74. "The `DefaultXfaLayerFactory` has been removed, " +
  75. "please use the `enableXfa` option when calling " +
  76. "the `getDocument`-function to control XfaLayer rendering."
  77. );
  78. }
  79. }
  80. export {
  81. AnnotationLayerBuilder,
  82. DefaultAnnotationLayerFactory,
  83. DefaultStructTreeLayerFactory,
  84. DefaultTextLayerFactory,
  85. DefaultXfaLayerFactory,
  86. DownloadManager,
  87. EventBus,
  88. GenericL10n,
  89. LinkTarget,
  90. NullL10n,
  91. parseQueryString,
  92. PDFFindController,
  93. PDFHistory,
  94. PDFLinkService,
  95. PDFPageView,
  96. PDFScriptingManager,
  97. PDFSinglePageViewer,
  98. PDFViewer,
  99. ProgressBar,
  100. RenderingStates,
  101. ScrollMode,
  102. SimpleLinkService,
  103. SpreadMode,
  104. StructTreeLayerBuilder,
  105. TextLayerBuilder,
  106. XfaLayerBuilder,
  107. };