Fix text position in drawSignatureFieldText
When centering vertically we calculate the y offset based on the height of the text and the annotation
When doing that we must ignore the border width, otherwise the text is offset downwards
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 4e633fc..a33951a 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -5288,7 +5288,7 @@
if (centerVertically) {
const double outTextHeight = textCommands.nLines * da.getFontPtSize();
if (outTextHeight < height) {
- yDelta -= (height - outTextHeight) / 2;
+ yDelta = height - (height - outTextHeight) / 2;
}
}
appendf("BT 1 0 0 1 {0:.2f} {1:.2f} Tm\n", leftMargin + textmargin, yDelta);