diff options
author | Thomas <> | 2021-03-26 15:42:00 +0100 |
---|---|---|
committer | Thomas <> | 2021-03-26 15:42:00 +0100 |
commit | 935a42e0c046282d1dda8aaf418822e25677c81a (patch) | |
tree | 05d0997caade3a271b6e15bd25190c58b99b346a /pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java | |
parent | 8a8d467d6415c5b12262ad18ff7f21f6b07cdcd4 (diff) | |
download | pdf-as-4-935a42e0c046282d1dda8aaf418822e25677c81a.tar.gz pdf-as-4-935a42e0c046282d1dda8aaf418822e25677c81a.tar.bz2 pdf-as-4-935a42e0c046282d1dda8aaf418822e25677c81a.zip |
simple PoC for this task
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java')
-rw-r--r-- | pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java index 01a3a298..9f015594 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java @@ -221,19 +221,24 @@ public class TableFactory implements IProfileConstants { row.add(entry); } } - if ((TYPE_VALUE + TYPE_CAPTION).equals(type) || (TYPE_CAPTION + TYPE_VALUE).equals(type)) + + if ((TYPE_VALUE + TYPE_CAPTION).equals(type) || (TYPE_CAPTION + TYPE_VALUE).equals(type) || "req".equals(type)) { // add a caption value pair String caption = profile.getCaption(key); String value = profile.getValue(key); //String caption = getSigCaption(key); //String value = getSigValue(key); - if (value != null) - { + ValueResolver resolver = "req".equals(type) + ? new ValueResolver(operationStatus) + : new ValueResolver(certProvider, operationStatus); + + if (value != null) { Entry c_entry = new Entry(Entry.TYPE_CAPTION, caption, key); c_entry.setNoWrap(true); // dferbas fix bug #331 c_entry.setStyle(defaultCaptionStyle_); - ValueResolver resolver = new ValueResolver(certProvider, operationStatus); + + Entry v_entry = new Entry(Entry.TYPE_VALUE, resolver.resolve(key, value, profile), key); v_entry.setStyle(defaultValueStyle_); @@ -248,8 +253,6 @@ public class TableFactory implements IProfileConstants { c_entry.setNoWrap(true); // dferbas fix bug #331 c_entry.setStyle(defaultCaptionStyle_); - ValueResolver resolver = new ValueResolver(certProvider, operationStatus); - Entry v_entry = new Entry(Entry.TYPE_VALUE, resolver.resolve(key, value, profile), key); v_entry.setStyle(defaultValueStyle_); |