1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Merge pull request #14114 from Snuffleupagus/issue-14110

[api-minor] Include the /Lang-property in the `documentInfo`, and use it in the viewer (issue 14110)
This commit is contained in:
Brendan Dahl 2021-10-19 08:08:08 -07:00 committed by GitHub
commit b66239d6dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 0 deletions

View file

@ -89,6 +89,15 @@ class Catalog {
);
}
get lang() {
const lang = this._catDict.get("Lang");
return shadow(
this,
"lang",
typeof lang === "string" ? stringToPDFString(lang) : null
);
}
/**
* @type {boolean} `true` for pure XFA documents,
* `false` for XFA Foreground documents.

View file

@ -1160,6 +1160,7 @@ class PDFDocument {
const docInfo = {
PDFFormatVersion: version,
Language: this.catalog.lang,
IsLinearized: !!this.linearization,
IsAcroFormPresent: this.formInfo.hasAcroForm,
IsXFAPresent: this.formInfo.hasXfa,