From 01e2179fac65002af735536fae3b3c781f7651f0 Mon Sep 17 00:00:00 2001 From: iroqueta Date: Fri, 3 Oct 2025 14:21:55 -0300 Subject: [PATCH] The {{pages}} macro was not printing in PDF reports using iText8 Issue: 206519 --- java/src/main/java/com/genexus/reports/PDFReportItext8.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/main/java/com/genexus/reports/PDFReportItext8.java b/java/src/main/java/com/genexus/reports/PDFReportItext8.java index 1a189a4ed..84eeb0631 100644 --- a/java/src/main/java/com/genexus/reports/PDFReportItext8.java +++ b/java/src/main/java/com/genexus/reports/PDFReportItext8.java @@ -720,7 +720,7 @@ else if (valign == VerticalAlign.BOTTOM.value()) template = new PdfFormXObject(new Rectangle(right - left, bottom - top)); templateCreated = true; } - cb.addXObjectAt(template, leftAux + leftMargin, this.pageSize.getTop() - bottomAux - topMargin -bottomMargin); + cb.addXObjectAt(template, leftAux + leftMargin, this.pageSize.getTop() - bottomAux - topMargin - bottomMargin - (baseFont.getAscent(sTxt,fontSize)/2)); templateFont = baseFont; templateFontSize = fontSize; templateColorFill = foreColor; @@ -949,7 +949,7 @@ public void GxEndDocument() { } if (template != null) { - PdfCanvas cb = new PdfCanvas(pdfPage); + PdfCanvas cb = new PdfCanvas(template, pdfDocument); cb.beginText(); cb.setFontAndSize(templateFont, templateFontSize); cb.setTextMatrix(0,0);