How sragu/pdf-validation works
Project type and purpose
• This is a single-module Java library (Gradle-based) whose sole purpose is “to check if the PDF has embedded JavaScript actions using the pdf-archive validator.” There is no separate frontend or microservice; it’s an API/library designed to be embedded in other Java applications or run as a command-line tool.
File structure
• Top-level Gradle wrapper files (gradlew, gradle/) and settings.gradle indicate a Gradle build.
• A single module named “lib” contains:
• src/main/java/pdf/gradle/Library.java — the main entry point/class
• src/main/resources/verapdf-profile-6-6-1-t01.xml — the pdf-archive validation profile
• src/test/java/pdf/gradle/LibraryTest.java — unit tests
• No external web components or databases; the library depends on the VeraPDF validator under the hood.
README
• Confirms the library’s one function: detect embedded JavaScript in PDFs.
• No further architectural notes—this is primarily a wrapper around pdf-archive validator with a specific XML profile.
Final advice
• Be very detailed: separate each step of the validation flow into its own component.
• Architectural elements: the wrapper (Library.java), the external validator, the profile resource, and the test harness.