Package gov.nasa.pds.tools.util
Class PDFUtil
- java.lang.Object
-
- gov.nasa.pds.tools.util.PDFUtil
-
public class PDFUtil extends Object
A class that validate if a PDF file conforms to PDF/A standard.
-
-
Constructor Summary
Constructors Constructor Description PDFUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getErrorMessage()
Returns error message from failed PDF/A validation, if one exists.String
getExternalErrorFilename()
Returns the name of the external error filename.boolean
validateFileStandardConformity(String baseDir, String pdfBase, URL parentURL, URL target)
Validate if a PDF file conforms to PDF/A standard.
-
-
-
Method Detail
-
getExternalErrorFilename
public String 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
public String getErrorMessage()
Returns error message from failed PDF/A validation, if one exists. Otherwise returns null.- Returns:
- errorMessage
-
-