Class PdfUA1Checker

  • All Implemented Interfaces:
    IValidationChecker

    public class PdfUA1Checker
    extends PdfUAChecker
    The class defines the requirements of the PDF/UA-1 standard and contains method implementations from the abstract PdfUAChecker class.

    The specification implemented by this class is ISO 14289-1.

    • Constructor Detail

      • PdfUA1Checker

        public PdfUA1Checker​(PdfDocument pdfDocument)
        Creates PdfUA1Checker instance with PDF document which will be validated against PDF/UA-1 standard.
        Parameters:
        pdfDocument - the document to validate
    • Method Detail

      • isPdfObjectReadyToFlush

        public boolean isPdfObjectReadyToFlush​(PdfObject object)
        Is PdfObject ready to flush..
        Parameters:
        object - the pdf object to check
        Returns:
        true if the object is ready to flush, false otherwise
      • checkFileSpec

        protected void checkFileSpec​(PdfDictionary fileSpec)
        Verify the conformity of the file specification dictionary.
        Parameters:
        fileSpec - the PdfDictionary containing file specification to be checked
      • checkMetadata

        protected void checkMetadata​(PdfCatalog catalog)
        Checks that the Catalog dictionary of a conforming file (the version number of a file may be any value from 1.0 to 1.7) contains the Metadata key whose value is a metadata stream. Also checks that the value of pdfuaid:part is 1 for conforming PDF files.

        Checks that the Metadata stream in the document catalog dictionary includes a dc:title entry reflecting the title of the document.

        Parameters:
        catalog - PdfCatalog document catalog dictionary
      • checkOCProperties

        void checkOCProperties​(PdfDictionary ocProperties)
        Description copied from class: PdfUAChecker
        Checks that all optional content configuration dictionaries in the file, including the default one, shall contain a Name entry (see ISO 32000-2:2020, Table 96, or ISO 32000-1:2008, 8.11.2.1, Table 98) whose value is a non-empty text string when document contains a Configs entry in the OCProperties entry of the document catalog dictionary (see ISO 32000-2:2020, Table 29, or ISO 32000-1:2008, 7.7.2, Table 28), and the Configs entry contains at least one optional content configuration dictionary.

        Also checks that the AS key does not appear in any optional content configuration dictionary.

        Overrides:
        checkOCProperties in class PdfUAChecker
        Parameters:
        ocProperties - OCProperties entry of the Catalog dictionary
      • checkNonSymbolicCmapSubtable

        void checkNonSymbolicCmapSubtable​(TrueTypeFont fontProgram)
        For all non-symbolic TrueType fonts used for rendering, the embedded TrueType font program shall contain one or several non-symbolic cmap entries such that all necessary glyph lookups can be carried out.
        Specified by:
        checkNonSymbolicCmapSubtable in class PdfUAChecker
        Parameters:
        fontProgram - the embedded TrueType font program to check
      • checkSymbolicCmapSubtable

        void checkSymbolicCmapSubtable​(TrueTypeFont fontProgram)
        Checks cmap entries present in the embedded TrueType font program of the symbolic TrueType font.

        The “cmap” table in the embedded font program shall either contain exactly one encoding or it shall contain, at least, the Microsoft Symbol (3,0 – Platform ID = 3, Encoding ID = 0) encoding.

        Specified by:
        checkSymbolicCmapSubtable in class PdfUAChecker
        Parameters:
        fontProgram - the embedded TrueType font program to check
      • checkCatalog

        private void checkCatalog​(PdfCatalog catalog)
      • checkStructureTreeRoot

        private void checkStructureTreeRoot​(PdfStructTreeRoot structTreeRoot)
      • checkCrypto

        private void checkCrypto​(PdfDictionary encryptionDictionary)
      • checkPdfObject

        private void checkPdfObject​(PdfObject obj)
        This method checks the requirements that must be fulfilled by a COS object in a PDF/UA document.
        Parameters:
        obj - the COS object that must be checked