mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Exposes all functional members via lib exports and use them in viewer.
This commit is contained in:
parent
1d12aed5ca
commit
1e3e14e6b2
25 changed files with 174 additions and 102 deletions
|
@ -12,7 +12,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals pdfjsFilePath */
|
||||
/* globals pdfjsFilePath, pdfjsVersion, pdfjsBuild */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
@ -2051,6 +2051,13 @@ var _UnsupportedManager = (function UnsupportedManagerClosure() {
|
|||
};
|
||||
})();
|
||||
|
||||
if (typeof pdfjsVersion !== 'undefined') {
|
||||
exports.version = pdfjsVersion;
|
||||
}
|
||||
if (typeof pdfjsBuild !== 'undefined') {
|
||||
exports.build = pdfjsBuild;
|
||||
}
|
||||
|
||||
exports.getDocument = getDocument;
|
||||
exports.PDFDataRangeTransport = PDFDataRangeTransport;
|
||||
exports.PDFWorker = PDFWorker;
|
||||
|
|
|
@ -40,9 +40,11 @@
|
|||
|
||||
// Sync the exports below with ./pdf.js file/template.
|
||||
exports.PDFJS = displayGlobal.PDFJS;
|
||||
|
||||
exports.build = displayAPI.build;
|
||||
exports.version = displayAPI.version;
|
||||
exports.getDocument = displayAPI.getDocument;
|
||||
exports.PDFDataRangeTransport = displayAPI.PDFDataRangeTransport;
|
||||
exports.PDFWorker = displayAPI.PDFWorker;
|
||||
exports.renderTextLayer = displayTextLayer.renderTextLayer;
|
||||
exports.AnnotationLayer = displayAnnotationLayer.AnnotationLayer;
|
||||
exports.CustomStyle = displayDOMUtils.CustomStyle;
|
||||
|
@ -51,4 +53,14 @@
|
|||
exports.MissingPDFException = sharedUtil.MissingPDFException;
|
||||
exports.SVGGraphics = displaySVG.SVGGraphics;
|
||||
exports.UnexpectedResponseException = sharedUtil.UnexpectedResponseException;
|
||||
exports.OPS = sharedUtil.OPS;
|
||||
exports.UNSUPPORTED_FEATURES = sharedUtil.UNSUPPORTED_FEATURES;
|
||||
exports.isValidUrl = sharedUtil.isValidUrl;
|
||||
exports.createObjectURL = sharedUtil.createObjectURL;
|
||||
exports.removeNullCharacters = sharedUtil.removeNullCharacters;
|
||||
exports.shadow = sharedUtil.shadow;
|
||||
exports.createBlob = sharedUtil.createBlob;
|
||||
exports.getFilenameFromUrl = displayDOMUtils.getFilenameFromUrl;
|
||||
exports.addLinkAttributes = displayDOMUtils.addLinkAttributes;
|
||||
|
||||
}));
|
||||
|
|
13
src/pdf.js
13
src/pdf.js
|
@ -45,9 +45,12 @@
|
|||
|
||||
//#if MAIN_FILE
|
||||
exports.PDFJS = pdfjsLibs.pdfjsDisplayGlobal.PDFJS;
|
||||
exports.build = pdfjsLibs.pdfjsDisplayAPI.build;
|
||||
exports.version = pdfjsLibs.pdfjsDisplayAPI.version;
|
||||
exports.getDocument = pdfjsLibs.pdfjsDisplayAPI.getDocument;
|
||||
exports.PDFDataRangeTransport =
|
||||
pdfjsLibs.pdfjsDisplayAPI.PDFDataRangeTransport;
|
||||
exports.PDFWorker = pdfjsLibs.pdfjsDisplayAPI.PDFWorker;
|
||||
exports.renderTextLayer = pdfjsLibs.pdfjsDisplayTextLayer.renderTextLayer;
|
||||
exports.AnnotationLayer =
|
||||
pdfjsLibs.pdfjsDisplayAnnotationLayer.AnnotationLayer;
|
||||
|
@ -58,6 +61,16 @@
|
|||
exports.SVGGraphics = pdfjsLibs.pdfjsDisplaySVG.SVGGraphics;
|
||||
exports.UnexpectedResponseException =
|
||||
pdfjsLibs.pdfjsSharedUtil.UnexpectedResponseException;
|
||||
exports.OPS = pdfjsLibs.pdfjsSharedUtil.OPS;
|
||||
exports.UNSUPPORTED_FEATURES = pdfjsLibs.pdfjsSharedUtil.UNSUPPORTED_FEATURES;
|
||||
exports.isValidUrl = pdfjsLibs.pdfjsSharedUtil.isValidUrl;
|
||||
exports.createObjectURL = pdfjsLibs.pdfjsSharedUtil.createObjectURL;
|
||||
exports.removeNullCharacters = pdfjsLibs.pdfjsSharedUtil.removeNullCharacters;
|
||||
exports.shadow = pdfjsLibs.pdfjsSharedUtil.shadow;
|
||||
exports.createBlob = pdfjsLibs.pdfjsSharedUtil.createBlob;
|
||||
exports.getFilenameFromUrl =
|
||||
pdfjsLibs.pdfjsDisplayDOMUtils.getFilenameFromUrl;
|
||||
exports.addLinkAttributes = pdfjsLibs.pdfjsDisplayDOMUtils.addLinkAttributes;
|
||||
//#else
|
||||
exports.WorkerMessageHandler = pdfjsLibs.pdfjsCoreWorker.WorkerMessageHandler;
|
||||
//#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue