mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Move the cMapUrl
and cMapPacked
options from the global PDFJS
object and into getDocument
instead
This commit is contained in:
parent
b674409397
commit
3c2fbdffe6
13 changed files with 72 additions and 63 deletions
|
@ -69,8 +69,9 @@ class DOMCMapReaderFactory {
|
|||
|
||||
fetch({ name, }) {
|
||||
if (!this.baseUrl) {
|
||||
return Promise.reject(new Error('CMap baseUrl must be specified, ' +
|
||||
'see "PDFJS.cMapUrl" (and also "PDFJS.cMapPacked").'));
|
||||
return Promise.reject(new Error(
|
||||
'The CMap "baseUrl" parameter must be specified, ensure that ' +
|
||||
'the "cMapUrl" and "cMapPacked" API parameters are provided.'));
|
||||
}
|
||||
if (!name) {
|
||||
return Promise.reject(new Error('CMap name must be specified.'));
|
||||
|
@ -345,10 +346,6 @@ function getDefaultSetting(id) {
|
|||
return globalSettings ? globalSettings.disableFontFace : false;
|
||||
case 'disableCreateObjectURL':
|
||||
return globalSettings ? globalSettings.disableCreateObjectURL : false;
|
||||
case 'cMapUrl':
|
||||
return globalSettings ? globalSettings.cMapUrl : null;
|
||||
case 'cMapPacked':
|
||||
return globalSettings ? globalSettings.cMapPacked : false;
|
||||
case 'isEvalSupported':
|
||||
return globalSettings ? globalSettings.isEvalSupported : true;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue