From af77eda98bfac090a5792672dd89e7f0e0475338 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Wed, 25 Feb 2015 11:46:22 +0100 Subject: allow signature profile image to be encoded base64 string --- .../pdfas/lib/impl/stamping/pdfbox/TableDrawUtils.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/TableDrawUtils.java') diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/TableDrawUtils.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/TableDrawUtils.java index 1530ab03..dff8e543 100644 --- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/TableDrawUtils.java +++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/TableDrawUtils.java @@ -54,7 +54,7 @@ public class TableDrawUtils { PDPageContentStream contentStream, float x, float y, float width, float height, PDFBoxTable abstractTable, PDDocument doc, boolean subtable, PDResources formResources, - Map images, ISettings settings) + Map images, ISettings settings, IDGenerator generator) throws PdfAsException { logger.debug("Drawing Table: X {} Y {} WIDTH {} HEIGHT {} \n{}", x, y, @@ -69,14 +69,14 @@ public class TableDrawUtils { doc, subtable, settings); drawContent(page, contentStream, x, y, width, height, abstractTable, - doc, subtable, formResources, images, settings); + doc, subtable, formResources, images, settings, generator); } public static void drawContent(PDPage page, PDPageContentStream contentStream, float x, float y, float width, float height, PDFBoxTable abstractTable, PDDocument doc, boolean subtable, PDResources formResources, - Map images, ISettings settings) + Map images, ISettings settings, IDGenerator generator) throws PdfAsException { float contentx = x; @@ -124,7 +124,7 @@ public class TableDrawUtils { drawImage(page, contentStream, contentx, contenty, colWidth, abstractTable.getRowHeights()[i], padding, abstractTable, doc, cell, formResources, - images, settings); + images, settings, generator); break; case Entry.TYPE_TABLE: @@ -137,7 +137,7 @@ public class TableDrawUtils { drawTable(page, contentStream, contentx, contenty - abstractTable.getRowHeights()[i], colWidth, abstractTable.getRowHeights()[i], tbl_value, doc, - true, formResources, images, settings); + true, formResources, images, settings, generator); break; default: logger.warn("Unknown Cell entry type: " + cell.getType()); @@ -329,12 +329,12 @@ public class TableDrawUtils { float width, float height, float padding, PDFBoxTable abstractTable, PDDocument doc, Entry cell, PDResources formResources, Map images, - ISettings settings) throws PdfAsException { + ISettings settings, IDGenerator generator) throws PdfAsException { try { float innerHeight = height; float innerWidth = width; - String img_ref = (String) cell.getValue(); + String img_ref = generator.createHashedId((String) cell.getValue()); if (!images.containsKey(img_ref)) { logger.warn("Image not prepared! : " + img_ref); throw new PdfAsException("Image not prepared! : " + img_ref); -- cgit v1.2.3