mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
JS -- add support for page property in field
This commit is contained in:
parent
f0817015bd
commit
549aae6c3d
6 changed files with 104 additions and 9 deletions
|
@ -49,7 +49,6 @@ class Field extends PDFObject {
|
|||
this.multiline = data.multiline;
|
||||
this.multipleSelection = !!data.multipleSelection;
|
||||
this.name = data.name;
|
||||
this.page = data.page;
|
||||
this.password = data.password;
|
||||
this.print = data.print;
|
||||
this.radiosInUnison = data.radiosInUnison;
|
||||
|
@ -78,6 +77,7 @@ class Field extends PDFObject {
|
|||
this._fillColor = data.fillColor || ["T"];
|
||||
this._isChoice = Array.isArray(data.items);
|
||||
this._items = data.items || [];
|
||||
this._page = data.page || 0;
|
||||
this._strokeColor = data.strokeColor || ["G", 0];
|
||||
this._textColor = data.textColor || ["G", 0];
|
||||
this._value = data.value || "";
|
||||
|
@ -180,6 +180,14 @@ class Field extends PDFObject {
|
|||
this.strokeColor = color;
|
||||
}
|
||||
|
||||
get page() {
|
||||
return this._page;
|
||||
}
|
||||
|
||||
set page(_) {
|
||||
throw new Error("field.page is read-only");
|
||||
}
|
||||
|
||||
get textColor() {
|
||||
return this._textColor;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue