Class PdfConformance


  • public class PdfConformance
    extends java.lang.Object
    The class represents possible PDF document conformance.
    • Constructor Detail

      • PdfConformance

        public PdfConformance​(PdfAConformance aConformance,
                              PdfUAConformance uaConformance)
        Creates a new PdfConformance instance based on PDF/A and PDF/UA conformance.
        Parameters:
        aConformance - the PDF/A conformance
        uaConformance - the PDF/UA conformance
      • PdfConformance

        public PdfConformance​(PdfAConformance aConformance)
        Creates a new PdfConformance instance based on only PDF/A conformance.
        Parameters:
        aConformance - the PDF/A conformance
      • PdfConformance

        public PdfConformance​(PdfUAConformance uaConformance)
        Creates a new PdfConformance instance based on only PDF/UA conformance.
        Parameters:
        uaConformance - the PDF/UA conformance
      • PdfConformance

        public PdfConformance()
        Creates a new PdfConformance instance without PDF/A or PDF/UA conformance.
    • Method Detail

      • isPdfA

        public boolean isPdfA()
        Checks if any PDF/A conformance is specified.
        Returns:
        true if PDF/A conformance is specified, otherwise false
      • isPdfUA

        public boolean isPdfUA()
        Checks if any PDF/UA conformance is specified.
        Returns:
        true if PDF/UA conformance is specified, otherwise false
      • isPdfAOrUa

        public boolean isPdfAOrUa()
        Checks if any PDF/A or PDF/UA conformance is specified.
        Returns:
        true if PDF/A or PDF/UA conformance is specified, otherwise false
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • setConformanceToXmp

        public static void setConformanceToXmp​(XMPMeta xmpMeta,
                                               PdfConformance conformance)
                                        throws XMPException
        Sets required fields into XMP metadata according to passed PDF conformance.
        Parameters:
        xmpMeta - the xmp metadata to which required PDF conformance fields will be set
        conformance - the PDF conformance according to which XMP will be updated
        Throws:
        XMPException - if the file is not well-formed XML or if the parsing fails
      • getAConformance

        public static PdfAConformance getAConformance​(java.lang.String part,
                                                      java.lang.String level)
        Gets an instance of PdfAConformance based on passed part and level.
        Parameters:
        part - the part of PDF/A conformance
        level - the level of PDF/A conformance
        Returns:
        the PdfAConformance instance or null if there is no PDF/A conformance for passed parameters
      • getUAConformance

        private static PdfUAConformance getUAConformance​(java.lang.String part)