Skip to content

Commit ef5e9ff

Browse files
tomas-sexenianBeta Bot
authored andcommitted
Cherry pick branch 'genexuslabs:pages-placeholder' into beta
1 parent bc6daf9 commit ef5e9ff

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class PDFReportPDFBox extends GXReportPDFCommons{
6161
private final float DEFAULT_PDFBOX_LEADING = 1.2f;
6262
private Set<String> supportedHTMLTags = new HashSet<>();
6363
private PDPageContentStream currentPageContentStream;
64-
private final String pagesPlaceHolder = "{{pages}}";
64+
private final static String PAGES_PLACEHOLDER = "{{pages}}";
6565

6666
static {
6767
log = org.apache.logging.log4j.LogManager.getLogger(PDFReportPDFBox.class);
@@ -855,7 +855,7 @@ else if (barcodeType != null) {
855855
}
856856

857857
// Handle {{Pages}}
858-
if (sTxt.trim().equalsIgnoreCase(pagesPlaceHolder)) {
858+
if (sTxt.trim().equalsIgnoreCase(PAGES_PLACEHOLDER)) {
859859
if (!templateCreated) {
860860
templateFont = baseFont;
861861
templateFontSize = fontSize;
@@ -864,7 +864,7 @@ else if (barcodeType != null) {
864864
templateY = this.pageSize.getUpperRightY() - bottomAux - topMargin - bottomMargin;
865865
templateCreated = true;
866866
}
867-
sTxt = pagesPlaceHolder;
867+
sTxt = PAGES_PLACEHOLDER;
868868
}
869869

870870
float textBlockWidth = rightAux - leftAux;
@@ -1276,7 +1276,7 @@ private void replaceTemplatePages() throws IOException {
12761276
PDFTextStripper stripper = new PDFTextStripper() {
12771277
@Override
12781278
protected void writeString(String text, List<TextPosition> textPositions) throws IOException {
1279-
String placeholder = pagesPlaceHolder;
1279+
String placeholder = PAGES_PLACEHOLDER;
12801280
int index = text.indexOf(placeholder);
12811281
while (index != -1 && index + placeholder.length() <= textPositions.size()) {
12821282
float minX = Float.MAX_VALUE;
@@ -1484,4 +1484,4 @@ public void GxEndPage() {
14841484
}
14851485
}
14861486

1487-
}
1487+
}

0 commit comments

Comments
 (0)