aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-pdfbox-2/src/test/java/at/gv
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-pdfbox-2/src/test/java/at/gv')
-rw-r--r--pdf-as-pdfbox-2/src/test/java/at/gv/egiz/pdfas/lib/testpdfbox/SignatureFieldsAndPlaceHolderExtractorTest.java13
1 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));