Add verbosity as an api setting.

This commit is contained in:
Brendan Dahl 2013-12-18 13:39:03 -08:00
parent f2b717c637
commit 53549411b4
4 changed files with 27 additions and 6 deletions

View file

@ -93,6 +93,18 @@ PDFJS.pdfBug = PDFJS.pdfBug === undefined ? false : PDFJS.pdfBug;
*/
PDFJS.postMessageTransfers = PDFJS.postMessageTransfers === undefined ?
true : PDFJS.postMessageTransfers;
/**
* Controls the logging level.
* The constants from PDFJS.VERBOSITY_LEVELS should be used:
* - errors
* - warnings [default]
* - infos
* @var {Number}
*/
PDFJS.verbosity = PDFJS.verbosity === undefined ?
PDFJS.VERBOSITY_LEVELS.warnings : PDFJS.verbosity;
/**
* This is the main entry point for loading a PDF and interacting with it.
* NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR)
@ -864,7 +876,8 @@ var WorkerTransport = (function WorkerTransportClosure() {
source: source,
disableRange: PDFJS.disableRange,
maxImageSize: PDFJS.maxImageSize,
disableFontFace: PDFJS.disableFontFace
disableFontFace: PDFJS.disableFontFace,
verbosity: PDFJS.verbosity
});
},