Skip to content

Commit

Permalink
PDFBOX-5205: removed preflight dependency
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1911697 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
lehmi committed Aug 15, 2023
1 parent d0cabbe commit debc3f6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
6 changes: 0 additions & 6 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@
<artifactId>xmpbox</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>preflight</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.BufferedReader;
import java.io.File;
Expand All @@ -33,9 +32,6 @@
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
import org.apache.pdfbox.pdmodel.common.PDMetadata;
import org.apache.pdfbox.preflight.ValidationResult;
import org.apache.pdfbox.preflight.ValidationResult.ValidationError;
import org.apache.pdfbox.preflight.parser.PreflightParser;
import org.apache.xmpbox.XMPMetadata;
import org.apache.xmpbox.schema.DublinCoreSchema;
import org.apache.xmpbox.xml.DomXmpParser;
Expand Down Expand Up @@ -77,14 +73,6 @@ void testCreatePDFA() throws Exception
CreateSignature signing = new CreateSignature(keystore, "123456".toCharArray());
signing.signDetached(new File(pdfaFilename), new File(signedPdfaFilename));

// Verify that it is PDF/A-1b
ValidationResult result = PreflightParser.validate(new File(signedPdfaFilename));
for (ValidationError ve : result.getErrorsList())
{
System.err.println(ve.getErrorCode() + ": " + ve.getDetails());
}
assertTrue(result.isValid(), "PDF file created with CreatePDFA is not valid PDF/A-1b");

// check the XMP metadata
try (PDDocument document = Loader.loadPDF(new File(pdfaFilename)))
{
Expand Down

0 comments on commit debc3f6

Please sign in to comment.