Merge pull request #4045 from brendandahl/verbosity

Add verbosity as an api setting.
This commit is contained in:
Yury Delendik 2014-01-02 12:25:00 -08:00
commit c389451a5b
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)
@ -870,7 +882,8 @@ var WorkerTransport = (function WorkerTransportClosure() {
source: source,
disableRange: PDFJS.disableRange,
maxImageSize: PDFJS.maxImageSize,
disableFontFace: PDFJS.disableFontFace
disableFontFace: PDFJS.disableFontFace,
verbosity: PDFJS.verbosity
});
},