Class PDFUtil


  • public class PDFUtil
    extends Object
    A class that 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 file
        parentURL - 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