Merge pull request #18228 from calixteman/bug1899804
Don't display annotations with a PMD (barcode stuff) entry (bug 1899804)
This commit is contained in:
commit
361b54ec13
@ -2681,11 +2681,19 @@ class TextWidgetAnnotation extends WidgetAnnotation {
|
|||||||
constructor(params) {
|
constructor(params) {
|
||||||
super(params);
|
super(params);
|
||||||
|
|
||||||
|
const { dict } = params;
|
||||||
|
|
||||||
|
if (dict.has("PMD")) {
|
||||||
|
// It's used to display a barcode but it isn't specified so we just hide
|
||||||
|
// it to avoid any confusion.
|
||||||
|
this.flags |= AnnotationFlag.HIDDEN;
|
||||||
|
this.data.hidden = true;
|
||||||
|
warn("Barcodes are not supported");
|
||||||
|
}
|
||||||
|
|
||||||
this.data.hasOwnCanvas = this.data.readOnly && !this.data.noHTML;
|
this.data.hasOwnCanvas = this.data.readOnly && !this.data.noHTML;
|
||||||
this._hasText = true;
|
this._hasText = true;
|
||||||
|
|
||||||
const dict = params.dict;
|
|
||||||
|
|
||||||
// The field value is always a string.
|
// The field value is always a string.
|
||||||
if (typeof this.data.fieldValue !== "string") {
|
if (typeof this.data.fieldValue !== "string") {
|
||||||
this.data.fieldValue = "";
|
this.data.fieldValue = "";
|
||||||
|
|||||||
1
test/pdfs/bug1899804.pdf.link
Normal file
1
test/pdfs/bug1899804.pdf.link
Normal file
@ -0,0 +1 @@
|
|||||||
|
https://bugzilla.mozilla.org/attachment.cgi?id=9406437
|
||||||
@ -10064,5 +10064,22 @@
|
|||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"link": true,
|
"link": true,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "bug1899804_print",
|
||||||
|
"file": "pdfs/bug1899804.pdf",
|
||||||
|
"md5": "53d82575d6d5d314404ede8970073e1b",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": true,
|
||||||
|
"type": "eq",
|
||||||
|
"print": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "bug1899804",
|
||||||
|
"file": "pdfs/bug1899804.pdf",
|
||||||
|
"md5": "53d82575d6d5d314404ede8970073e1b",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": true,
|
||||||
|
"type": "eq"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user