diff options
author | wprinz <wprinz@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2008-05-30 10:03:33 +0000 |
---|---|---|
committer | wprinz <wprinz@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2008-05-30 10:03:33 +0000 |
commit | 701ee11d3414bdb712ede023b0a5b567abd8a1bf (patch) | |
tree | 4653702c8dbf700cfb943d9f7578287803f3fa5c /src | |
parent | 88336a5b740b8a4f722437b3be32b9360d170fc9 (diff) | |
download | pdf-as-3-701ee11d3414bdb712ede023b0a5b567abd8a1bf.tar.gz pdf-as-3-701ee11d3414bdb712ede023b0a5b567abd8a1bf.tar.bz2 pdf-as-3-701ee11d3414bdb712ede023b0a5b567abd8a1bf.zip |
CR Unsichtbare Felder
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@270 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/impl/signator/textual/TextualSignator_1_0_0.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/impl/signator/textual/TextualSignator_1_0_0.java b/src/main/java/at/gv/egiz/pdfas/impl/signator/textual/TextualSignator_1_0_0.java index b49803c..a5f0131 100644 --- a/src/main/java/at/gv/egiz/pdfas/impl/signator/textual/TextualSignator_1_0_0.java +++ b/src/main/java/at/gv/egiz/pdfas/impl/signator/textual/TextualSignator_1_0_0.java @@ -17,6 +17,7 @@ */
package at.gv.egiz.pdfas.impl.signator.textual;
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
import at.gv.egiz.pdfas.exceptions.framework.SignatorException;
import at.gv.egiz.pdfas.framework.input.DataSource;
import at.gv.egiz.pdfas.framework.input.PdfDataSource;
@@ -34,6 +35,8 @@ import at.knowcenter.wag.egov.egiz.pdf.PositioningInstruction; import at.knowcenter.wag.egov.egiz.pdf.TablePos;
import at.knowcenter.wag.egov.egiz.sig.SignatureDataImpl;
import at.knowcenter.wag.egov.egiz.sig.SignatureObject;
+import at.knowcenter.wag.egov.egiz.sig.SignatureTypeDefinition;
+import at.knowcenter.wag.egov.egiz.sig.SignatureTypes;
import at.knowcenter.wag.egov.egiz.sig.signatureobject.SignatureObjectHelper;
import com.lowagie.text.pdf.PdfPTable;
@@ -87,6 +90,12 @@ public class TextualSignator_1_0_0 implements Signator {
try
{
+ SignatureTypeDefinition std = SignatureTypes.getInstance().getSignatureTypeDefinition(profile);
+ if (!std.isTextExtractable())
+ {
+ throw new SignatorException(ErrorCode.PROFILE_NOT_USABLE_FOR_TEXT, "The signature profile " + profile + " is not text extractable and thereby cannot be used for textual signature.");
+ }
+
TextualSignatorInformation tsi = new TextualSignatorInformation();
tsi.originalDocument = pdfDataSource;
tsi.profile = profile;
@@ -128,7 +137,7 @@ public class TextualSignator_1_0_0 implements Signator PositioningInstruction pi = PdfAS.determineTablePositioning(tsi.pos, tsi.profile, tsi.originalDocument, pdf_table);
- IncrementalUpdateInformation iui = IncrementalUpdateHelper.writeIncrementalUpdateToDataSink(tsi.originalDocument, dataSink, pdf_table, pi);
+ IncrementalUpdateInformation iui = IncrementalUpdateHelper.writeIncrementalUpdateToDataSink(tsi.originalDocument, dataSink, pdf_table, tsi.profile, pi);
tsi.atp = iui.actualTablePos;
// OutputStream os = dataSink.createOutputStream(PdfAS.PDF_MIME_TYPE);
|