Package gov.nasa.pds.tools.util
Class PDFUtil
java.lang.Object
gov.nasa.pds.tools.util.PDFUtil
A class that validate if a PDF file conforms to PDF/A standard.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns error message from failed PDF/A validation, if one exists.Returns the name of the external error filename.booleanvalidateFileStandardConformity(String baseDir, String pdfBase, URL parentURL, URL target) Validate if a PDF file conforms to PDF/A standard.
-
Constructor Details
-
PDFUtil
public PDFUtil()
-
-
Method Details
-
getExternalErrorFilename
Returns the name of the external error filename. Can be null. -
validateFileStandardConformity
public boolean validateFileStandardConformity(String baseDir, String pdfBase, URL parentURL, URL target) throws Exception Validate if a PDF file conforms to PDF/A standard.- Parameters:
pdfBase- The basename of the PDF fileparentURL- The URL of the parent of pdfBase.- Returns:
- true if the PDF is PDF/A compliant, and false otherwise
- Throws:
Exception
-
getErrorMessage
Returns error message from failed PDF/A validation, if one exists. Otherwise returns null.- Returns:
- errorMessage
-