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.
-
-
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.URL
getTarget()
Returns the URL of the target.boolean
validateFileStandardConformity(String baseDir, String pdfBase, URL parentURL)
Validate if a PDF file conforms to PDF/A standard.
-
-
-
Constructor Detail
-
PDFUtil
public PDFUtil(URL target)
-
-
Method Detail
-
getExternalErrorFilename
public String getExternalErrorFilename()
Returns the name of the external error filename. Can be null.
-
getTarget
public URL getTarget()
Returns the URL of the target.
-
validateFileStandardConformity
public boolean validateFileStandardConformity(String baseDir, String pdfBase, URL parentURL) 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
-
-