mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Currently we re-implement the same helper function twice, which in hindsight seems like the wrong decision since that way it's quite easy for the implementations to accidentally diverge. The reason for doing it this way was because the code in the worker-thread is able to check for `Ref`- and `Name`-instances directly, which obviously isn't possible in the viewer but can be solved by passing validation-functions to the helper.
118 lines
2.4 KiB
JavaScript
118 lines
2.4 KiB
JavaScript
/* Copyright 2016 Mozilla Foundation
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
const {
|
|
AbortException,
|
|
AnnotationEditorLayer,
|
|
AnnotationEditorParamsType,
|
|
AnnotationEditorType,
|
|
AnnotationEditorUIManager,
|
|
AnnotationLayer,
|
|
AnnotationMode,
|
|
AnnotationType,
|
|
build,
|
|
ColorPicker,
|
|
createValidAbsoluteUrl,
|
|
DOMSVGFactory,
|
|
DrawLayer,
|
|
FeatureTest,
|
|
fetchData,
|
|
getDocument,
|
|
getFilenameFromUrl,
|
|
getPdfFilenameFromUrl,
|
|
getUuid,
|
|
getXfaPageViewport,
|
|
GlobalWorkerOptions,
|
|
ImageKind,
|
|
InvalidPDFException,
|
|
isDataScheme,
|
|
isPdfFile,
|
|
isValidExplicitDest,
|
|
noContextMenu,
|
|
normalizeUnicode,
|
|
OPS,
|
|
OutputScale,
|
|
PasswordResponses,
|
|
PDFDataRangeTransport,
|
|
PDFDateString,
|
|
PDFWorker,
|
|
PermissionFlag,
|
|
PixelsPerInch,
|
|
RenderingCancelledException,
|
|
ResponseException,
|
|
setLayerDimensions,
|
|
shadow,
|
|
SignatureExtractor,
|
|
stopEvent,
|
|
SupportedImageMimeTypes,
|
|
TextLayer,
|
|
TouchManager,
|
|
Util,
|
|
VerbosityLevel,
|
|
version,
|
|
XfaLayer,
|
|
} = globalThis.pdfjsLib;
|
|
|
|
export {
|
|
AbortException,
|
|
AnnotationEditorLayer,
|
|
AnnotationEditorParamsType,
|
|
AnnotationEditorType,
|
|
AnnotationEditorUIManager,
|
|
AnnotationLayer,
|
|
AnnotationMode,
|
|
AnnotationType,
|
|
build,
|
|
ColorPicker,
|
|
createValidAbsoluteUrl,
|
|
DOMSVGFactory,
|
|
DrawLayer,
|
|
FeatureTest,
|
|
fetchData,
|
|
getDocument,
|
|
getFilenameFromUrl,
|
|
getPdfFilenameFromUrl,
|
|
getUuid,
|
|
getXfaPageViewport,
|
|
GlobalWorkerOptions,
|
|
ImageKind,
|
|
InvalidPDFException,
|
|
isDataScheme,
|
|
isPdfFile,
|
|
isValidExplicitDest,
|
|
noContextMenu,
|
|
normalizeUnicode,
|
|
OPS,
|
|
OutputScale,
|
|
PasswordResponses,
|
|
PDFDataRangeTransport,
|
|
PDFDateString,
|
|
PDFWorker,
|
|
PermissionFlag,
|
|
PixelsPerInch,
|
|
RenderingCancelledException,
|
|
ResponseException,
|
|
setLayerDimensions,
|
|
shadow,
|
|
SignatureExtractor,
|
|
stopEvent,
|
|
SupportedImageMimeTypes,
|
|
TextLayer,
|
|
TouchManager,
|
|
Util,
|
|
VerbosityLevel,
|
|
version,
|
|
XfaLayer,
|
|
};
|