mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Don't display annotations with a PMD (barcode stuff) entry (bug 1899804)
There's no specification for that (even if it's possible to have an idea from the xfa specs) so we just want to hide them in order to avoid to display something wrong.
This commit is contained in:
parent
bb73d2a922
commit
e3faa40f0f
3 changed files with 28 additions and 2 deletions
|
@ -2681,11 +2681,19 @@ class TextWidgetAnnotation extends WidgetAnnotation {
|
|||
constructor(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._hasText = true;
|
||||
|
||||
const dict = params.dict;
|
||||
|
||||
// The field value is always a string.
|
||||
if (typeof this.data.fieldValue !== "string") {
|
||||
this.data.fieldValue = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue