diff options
author | Alexander Marsalek <amarsalek@iaik.tugraz.at> | 2021-07-22 16:39:01 +0200 |
---|---|---|
committer | Alexander Marsalek <amarsalek@iaik.tugraz.at> | 2021-07-22 16:39:01 +0200 |
commit | 05452392941195e2f419793b45253551509048b1 (patch) | |
tree | b948d1703d79e0d9d5c272f66382043e8d26ed1a | |
parent | 980eed2c3ffe3784747abd5dc6a6fdebbbe2caff (diff) | |
download | pdf-as-4-05452392941195e2f419793b45253551509048b1.tar.gz pdf-as-4-05452392941195e2f419793b45253551509048b1.tar.bz2 pdf-as-4-05452392941195e2f419793b45253551509048b1.zip |
more test files
-rw-r--r-- | pdf-as-pdfbox-2/src/test/java/at/gv/egiz/pdfas/lib/testpdfbox/SignatureFieldsAndPlaceHolderExtractorTest.java | 13 | ||||
-rw-r--r-- | pdf-as-pdfbox-2/src/test/resources/manySignFields.pdf | bin | 0 -> 181760 bytes | |||
-rw-r--r-- | pdf-as-pdfbox-2/src/test/resources/manySignFields_signed4.pdf | bin | 0 -> 233204 bytes |
3 files changed, 13 insertions, 0 deletions
diff --git a/pdf-as-pdfbox-2/src/test/java/at/gv/egiz/pdfas/lib/testpdfbox/SignatureFieldsAndPlaceHolderExtractorTest.java b/pdf-as-pdfbox-2/src/test/java/at/gv/egiz/pdfas/lib/testpdfbox/SignatureFieldsAndPlaceHolderExtractorTest.java index 14fb962f..e137c16e 100644 --- a/pdf-as-pdfbox-2/src/test/java/at/gv/egiz/pdfas/lib/testpdfbox/SignatureFieldsAndPlaceHolderExtractorTest.java +++ b/pdf-as-pdfbox-2/src/test/java/at/gv/egiz/pdfas/lib/testpdfbox/SignatureFieldsAndPlaceHolderExtractorTest.java @@ -5,12 +5,15 @@ import at.gv.egiz.pdfas.lib.impl.placeholder.SignaturePlaceholderData; import org.apache.pdfbox.pdmodel.PDDocument; import java.io.File; +import java.util.List; public class SignatureFieldsAndPlaceHolderExtractorTest { public static void main(String[] args) { String dir = "/Users/amarsalek/Documents/pdf-as-4/pdf-as-pdfbox-2/src/test/resources/"; + getPlacHolders(dir+ "manySignFields.pdf"); + getPlacHolders(dir+ "manySignFields_signed4.pdf"); getNextSignaturePlaceHolder(dir + "new_qr_2-2.pdf"); getNextSignaturePlaceHolder(dir + "new_qr_2_signed.pdf"); getNextSignaturePlaceHolder(dir + "new_qr_2_signed_signed.pdf"); @@ -18,6 +21,16 @@ public class SignatureFieldsAndPlaceHolderExtractorTest { //TODO convert into junit test } + private static void getPlacHolders(String filePath) { + try { + PDDocument doc = PDDocument.load(new File(filePath)); + List<String> result = SignatureFieldsAndPlaceHolderExtractor.findEmptySignatureFields(doc); + System.out.println(filePath + ": " + result); + } catch (Throwable e) { + e.printStackTrace(); + } + } + public static void getNextSignaturePlaceHolder(String filePath) { try { PDDocument doc = PDDocument.load(new File(filePath)); diff --git a/pdf-as-pdfbox-2/src/test/resources/manySignFields.pdf b/pdf-as-pdfbox-2/src/test/resources/manySignFields.pdf Binary files differnew file mode 100644 index 00000000..970cd132 --- /dev/null +++ b/pdf-as-pdfbox-2/src/test/resources/manySignFields.pdf diff --git a/pdf-as-pdfbox-2/src/test/resources/manySignFields_signed4.pdf b/pdf-as-pdfbox-2/src/test/resources/manySignFields_signed4.pdf Binary files differnew file mode 100644 index 00000000..fb639c99 --- /dev/null +++ b/pdf-as-pdfbox-2/src/test/resources/manySignFields_signed4.pdf |