diff --git a/src/core/annotation.js b/src/core/annotation.js index d6fac6b04..9521ec53c 100644 --- a/src/core/annotation.js +++ b/src/core/annotation.js @@ -4230,15 +4230,16 @@ class UnderlineAnnotation extends MarkupAnnotation { : [0, 0, 0]; const strokeAlpha = dict.get("CA"); + // The values 0.571 and 1.3 below corresponds to what Acrobat is doing. this._setDefaultAppearance({ xref, - extra: "[] 0 d 1 w", + extra: "[] 0 d 0.571 w", strokeColor, strokeAlpha, pointsCallback: (buffer, points) => { buffer.push( - `${points[2].x} ${points[2].y} m`, - `${points[3].x} ${points[3].y} l`, + `${points[2].x} ${points[2].y + 1.3} m`, + `${points[3].x} ${points[3].y + 1.3} l`, "S" ); return [points[0].x, points[1].x, points[3].y, points[1].y]; diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index e4d9b49b2..e8becca1e 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -589,3 +589,4 @@ !issue16278.pdf !copy_paste_ligatures.pdf !issue16316.pdf +!issue14565.pdf diff --git a/test/pdfs/issue14565.pdf b/test/pdfs/issue14565.pdf new file mode 100644 index 000000000..eab979069 Binary files /dev/null and b/test/pdfs/issue14565.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index b3802a09f..e9cfceab0 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -7572,5 +7572,13 @@ "link": true, "forms": true, "type": "eq" + }, + { + "id": "issue14565", + "file": "pdfs/issue14565.pdf", + "md5": "ee0b064d227fe90a4795ff0c4dd0a47c", + "rounds": 1, + "annotations": true, + "type": "eq" } ]