Skip to content

Commit 8cebd25

Browse files
iroquetaBeta Bot
authored andcommitted
Cherry pick branch 'genexuslabs:fix/pages_itext8' into beta
1 parent c51c14a commit 8cebd25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/src/main/java/com/genexus/reports/PDFReportItext8.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ else if (valign == VerticalAlign.BOTTOM.value())
720720
template = new PdfFormXObject(new Rectangle(right - left, bottom - top));
721721
templateCreated = true;
722722
}
723-
cb.addXObjectAt(template, leftAux + leftMargin, this.pageSize.getTop() - bottomAux - topMargin -bottomMargin);
723+
cb.addXObjectAt(template, leftAux + leftMargin, this.pageSize.getTop() - bottomAux - topMargin - bottomMargin - (baseFont.getAscent(sTxt,fontSize)/2));
724724
templateFont = baseFont;
725725
templateFontSize = fontSize;
726726
templateColorFill = foreColor;
@@ -949,7 +949,7 @@ public void GxEndDocument() {
949949
}
950950

951951
if (template != null) {
952-
PdfCanvas cb = new PdfCanvas(pdfPage);
952+
PdfCanvas cb = new PdfCanvas(template, pdfDocument);
953953
cb.beginText();
954954
cb.setFontAndSize(templateFont, templateFontSize);
955955
cb.setTextMatrix(0,0);

0 commit comments

Comments
 (0)