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

For text widgets, get the text from the AP stream instead of from the format callback (bug 1825002)

When fixing bug 1766987, I thought the field formatted value came from
the result of the format callback: I was wrong. The format callback is ran
but the value is unused (maybe it's useful to set some global vars... or
it's just a bug in Acrobat). Anyway the value to display is the one rendered
in the AP stream.
The field value setter has been simplified and that fixes issue #16409.
This commit is contained in:
Calixte Denizet 2023-05-16 23:03:01 +02:00
parent 5ae353cf4d
commit 177036e6ae
7 changed files with 93 additions and 35 deletions

View file

@ -2461,6 +2461,10 @@ class TextWidgetAnnotation extends WidgetAnnotation {
this.data.doNotScroll = this.hasFieldFlag(AnnotationFieldFlag.DONOTSCROLL);
}
get hasTextContent() {
return !!this.appearance;
}
_getCombAppearance(
defaultAppearance,
font,