From b07437dbfa6907179917b505a6fcbe020fa88a97 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Wed, 2 Aug 2023 23:03:35 +0100 Subject: [PATCH] get info DONE! --- .../controller/api/security/GetInfoOnPDF.java | 18 +---------------- .../templates/security/get-info-on-pdf.html | 20 +++++++++++++------ 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java index a167cb74..fea57764 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java @@ -260,23 +260,7 @@ public class GetInfoOnPDF { // Digital Signatures using iText7 TODO - - - - PDAcroForm pdAcroForm = pdfBoxDoc.getDocumentCatalog().getAcroForm(); - ArrayNode formFieldsArray2 = objectMapper.createArrayNode(); - if (pdAcroForm != null) { - - for (PDField field : pdAcroForm.getFields()) { - ObjectNode fieldNode = objectMapper.createObjectNode(); - fieldNode.put("FieldName", field.getFullyQualifiedName()); - fieldNode.put("FieldType", field.getFieldType()); - // Add more attributes as needed... - formFieldsArray2.add(fieldNode); - } - - } - jsonOutput.set("FormFields2", formFieldsArray2); + PDStructureTreeRoot structureTreeRoot = pdfBoxDoc.getDocumentCatalog().getStructureTreeRoot(); diff --git a/src/main/resources/templates/security/get-info-on-pdf.html b/src/main/resources/templates/security/get-info-on-pdf.html index dc93186c..a77b5ae6 100644 --- a/src/main/resources/templates/security/get-info-on-pdf.html +++ b/src/main/resources/templates/security/get-info-on-pdf.html @@ -5,7 +5,6 @@
-