diff options
Diffstat (limited to 'pdf-as-pdfbox-2/src/main/java/at/knowcenter/wag/egov')
-rw-r--r-- | pdf-as-pdfbox-2/src/main/java/at/knowcenter/wag/egov/egiz/pdfbox2/pdf/PDFUtilities.java | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/pdf-as-pdfbox-2/src/main/java/at/knowcenter/wag/egov/egiz/pdfbox2/pdf/PDFUtilities.java b/pdf-as-pdfbox-2/src/main/java/at/knowcenter/wag/egov/egiz/pdfbox2/pdf/PDFUtilities.java index 08ef64b7..995b4e10 100644 --- a/pdf-as-pdfbox-2/src/main/java/at/knowcenter/wag/egov/egiz/pdfbox2/pdf/PDFUtilities.java +++ b/pdf-as-pdfbox-2/src/main/java/at/knowcenter/wag/egov/egiz/pdfbox2/pdf/PDFUtilities.java @@ -89,17 +89,22 @@ public abstract class PDFUtilities implements IConfigurationConstants{ int yCoord = bim.getHeight() - 1 - (int)footer_line; - for(int row = yCoord; row >= 0; row--){ - for(int col = 0; col < bim.getWidth(); col++){ - int val = bim.getRGB(col, row); - if(val != bgColor.getRGB()){ - yCoord = row; - row=-1; - break; + for(int row = yCoord; row >= 0; row--) + { + if (row == 0) + yCoord = row; + else + { + for(int col = 0; col < bim.getWidth(); col++){ + int val = bim.getRGB(col, row); + if(val != bgColor.getRGB()){ + yCoord = row; + row=-1; + break; + } } } } - String outFile = settings.getValue(SIG_PLACEMENT_DEBUG_OUTPUT); if(outFile!=null){ ImageIOUtil.writeImage(bim, outFile, 72); |