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);