mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #15981 from Snuffleupagus/cMapPacked-true
[api-minor] Let the `cMapPacked` parameter, in `getDocument`, default to `true`
This commit is contained in:
commit
e848a0e61c
7 changed files with 13 additions and 21 deletions
|
@ -166,7 +166,7 @@ if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION")) {
|
|||
* @property {string} [cMapUrl] - The URL where the predefined Adobe CMaps are
|
||||
* located. Include the trailing slash.
|
||||
* @property {boolean} [cMapPacked] - Specifies if the Adobe CMaps are binary
|
||||
* packed or not.
|
||||
* packed or not. The default value is `true`.
|
||||
* @property {Object} [CMapReaderFactory] - The factory that will be used when
|
||||
* reading built-in CMap files. Providing a custom factory is useful for
|
||||
* environments without Fetch API or `XMLHttpRequest` support, such as
|
||||
|
@ -347,6 +347,7 @@ function getDocument(src) {
|
|||
params[key] = val;
|
||||
}
|
||||
|
||||
params.cMapPacked = params.cMapPacked !== false;
|
||||
params.CMapReaderFactory =
|
||||
params.CMapReaderFactory || DefaultCMapReaderFactory;
|
||||
params.StandardFontDataFactory =
|
||||
|
|
|
@ -65,7 +65,7 @@ class BaseCanvasFactory {
|
|||
}
|
||||
|
||||
class BaseCMapReaderFactory {
|
||||
constructor({ baseUrl = null, isCompressed = false }) {
|
||||
constructor({ baseUrl = null, isCompressed = true }) {
|
||||
if (this.constructor === BaseCMapReaderFactory) {
|
||||
unreachable("Cannot initialize BaseCMapReaderFactory.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue