aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-12-10 08:04:59 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-12-10 08:04:59 +0000
commit8bf7db5feeba468ae6cbfe642b0aed899b00d535 (patch)
tree8811cfd745b38743724dbf730152bf6c17d3f44b /src/main/java/at/knowcenter/wag/egov/egiz
parentaac0d2681ecdedeb619d782b2fcc06293742a9c7 (diff)
downloadpdf-as-3-8bf7db5feeba468ae6cbfe642b0aed899b00d535.tar.gz
pdf-as-3-8bf7db5feeba468ae6cbfe642b0aed899b00d535.tar.bz2
pdf-as-3-8bf7db5feeba468ae6cbfe642b0aed899b00d535.zip
Absolute filename for image declaration fixed.
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@237 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz')
-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);
}