aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java20
1 files changed, 17 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 94abc17..48acb87 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
@@ -303,7 +303,7 @@ public class PDFSignatureObjectIText implements PDFSignatureObject
String fontPath = SettingsReader.RESOURCES_PATH + "fonts" + File.separator + fontName;
logger_.debug("Instantiating \"" + fontPath + "\".");
- font = new Font(BaseFont.createFont(fontPath, BaseFont.WINANSI, true), fontSize);
+ font = new Font(BaseFont.createFont(fontPath, BaseFont.WINANSI, true), fontSize);
fontMap_.put(fontString, font);
}
return font;
@@ -340,7 +340,15 @@ public class PDFSignatureObjectIText implements PDFSignatureObject
String profileid = sigObject_.getSignatureTypeDefinition().getType();
String pdfa = SettingsReader.getInstance().getSetting("sig_obj." +profileid+".key."+SIG_PDFA1_B_VALID, "default."+SIG_PDFA1_B_VALID, "false");
pdfaValid= "true".equalsIgnoreCase(pdfa);
- SubsetLocal.set(!pdfaValid);
+
+// exthex test
+ //SubsetLocal.set(!pdfaValid);
+
+// boolean forceSubset = true; // get this from config, default to false
+ //String
+
+ //SubsetLocal.set(true); // exthex
+
logger_.trace("Sign PDF/A compliant:"+pdfa);
} catch (SettingsException e1)
{
@@ -378,7 +386,12 @@ public class PDFSignatureObjectIText implements PDFSignatureObject
if (pdfaValid) {
throw new PDFDocumentException(ErrorCode.NO_EMBEDABLE_TTF_CONFIGURED_FOR_PDFA, "PDF/A modus requires an embedable true type font");
}
- cell_font = getCellFont(font_string);
+ cell_font = getCellFont(font_string);
+
+ }
+ // exthex
+ if (pdfaValid && abstractCell.getType() == Entry.TYPE_VALUE) {
+ SubsetLocal.addNonSubsetFont(cell_font.getBaseFont());
}
Phrase text_phrase = new Phrase(text, cell_font);
pdf_cell = new PdfPCell(text_phrase);
@@ -543,6 +556,7 @@ public class PDFSignatureObjectIText implements PDFSignatureObject
*/
private PdfPTable createPDFSignatureObject(SignatureObject sigObject) throws PDFDocumentException
{
+ SubsetLocal.clear();
Table table = sigObject.getAbstractTable();
PdfPTable pdf_table = renderTable(table);
return pdf_table;