diff options
author | pdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-11-08 15:35:20 +0000 |
---|---|---|
committer | pdanner <pdanner@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-11-08 15:35:20 +0000 |
commit | 85ec627dba6daa69ea41593e5b1258ba589cadb3 (patch) | |
tree | f915b1001f9ac0358423706ac56f3930135af038 /src/main/java/at | |
parent | 8edbc177564f55f3f6ef9ec8ec98d6c781b6ce52 (diff) | |
download | pdf-as-3-85ec627dba6daa69ea41593e5b1258ba589cadb3.tar.gz pdf-as-3-85ec627dba6daa69ea41593e5b1258ba589cadb3.tar.bz2 pdf-as-3-85ec627dba6daa69ea41593e5b1258ba589cadb3.zip |
added compression for signature update block (excluding xobject, including fonts!)
added subsetting for pdfa caption font
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@605 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java | 20 |
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;
|