mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Merge pull request #13437 from calixteman/xfa_mv_root
XFA - Move the fake HTML representation of XFA from the worker to the main thread
This commit is contained in:
commit
8c53bf8647
5 changed files with 50 additions and 32 deletions
|
@ -146,8 +146,7 @@ class Page {
|
|||
|
||||
_getBoundingBox(name) {
|
||||
if (this.xfaData) {
|
||||
const { width, height } = this.xfaData.attributes.style;
|
||||
return [0, 0, parseInt(width), parseInt(height)];
|
||||
return this.xfaData.bbox;
|
||||
}
|
||||
|
||||
const box = this._getInheritableProperty(name, /* getArray = */ true);
|
||||
|
@ -241,7 +240,9 @@ class Page {
|
|||
|
||||
get xfaData() {
|
||||
if (this.xfaFactory) {
|
||||
return shadow(this, "xfaData", this.xfaFactory.getPage(this.pageIndex));
|
||||
return shadow(this, "xfaData", {
|
||||
bbox: this.xfaFactory.getBoundingBox(this.pageIndex),
|
||||
});
|
||||
}
|
||||
return shadow(this, "xfaData", null);
|
||||
}
|
||||
|
@ -851,8 +852,11 @@ class PDFDocument {
|
|||
return shadow(this, "xfaFaxtory", null);
|
||||
}
|
||||
|
||||
get isPureXfa() {
|
||||
return this.xfaFactory !== null;
|
||||
get htmlForXfa() {
|
||||
if (this.xfaFactory) {
|
||||
return this.xfaFactory.getPages();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
async loadXfaFonts(handler, task) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue