aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/knowcenter/wag')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java
index 6c609ae..0ad8583 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java
@@ -293,14 +293,23 @@ public class PDFSignatureObjectIText implements PDFSignatureObject
try
{
String img_ref = (String) abstractCell.getValue();
- String img_location = SettingsReader.relocateFile(img_ref);
- File img_file = new File (img_location);
+ // fixed by tknall start
+ File img_file = new File(img_ref);
+ if (!img_file.isAbsolute()) {
+ logger_.debug("Image file declaration is relative. Prepending path of resources directory.");
+ img_file = new File(SettingsReader.relocateFile(img_ref));
+ } else {
+ logger_.debug("Image file declaration is absolute. Skipping file relocation.");
+ }
+// String img_location = SettingsReader.relocateFile(img_ref);
+// File img_file = new File (img_location);
if (!img_file.exists())
{
logger_.debug("Image file \"" + img_file.getCanonicalPath() + "\" doesn't exist.");
throw new PDFDocumentException(220, "Image file \"" + img_file.getCanonicalPath() + "\" doesn't exist.");
}
- Image image = Image.getInstance(img_location);
+ Image image = Image.getInstance(img_file.getCanonicalPath());
+ // tknall end
pdf_cell = new PdfPCell(image, true);
setCellStyle(pdf_cell, cell_style);
}