aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-pdfbox-2/src/main/java
diff options
context:
space:
mode:
authoremusic <emina.music@egiz.gv.at>2018-11-22 12:45:40 +0100
committeremusic <emina.music@egiz.gv.at>2018-11-22 12:45:40 +0100
commitcd6ff625d48a63e024b05ed1a253be3551e41599 (patch)
treefada2d54e0bce3be79466611a72ee3584d5a8971 /pdf-as-pdfbox-2/src/main/java
parentc42bd1c0e0b0e4016ff617e6efc7de8ca60f1019 (diff)
downloadpdf-as-4-cd6ff625d48a63e024b05ed1a253be3551e41599.tar.gz
pdf-as-4-cd6ff625d48a63e024b05ed1a253be3551e41599.tar.bz2
pdf-as-4-cd6ff625d48a63e024b05ed1a253be3551e41599.zip
adding footer functionality
Diffstat (limited to 'pdf-as-pdfbox-2/src/main/java')
-rw-r--r--pdf-as-pdfbox-2/src/main/java/at/knowcenter/wag/egov/egiz/pdfbox2/pdf/PDFUtilities.java21
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);