Class XMPChecker

java.lang.Object
org.verapdf.gf.model.impl.pd.util.XMPChecker

public final class XMPChecker extends Object
This class matches document information dictionary and xmp metadata by comparing eight predefined fields:
  1. Title (-> Title)
  2. Author (-> Creators)
  3. Producer (-> Producer)
  4. Creator (-> CreatorTool)
  5. Keywords (-> Keywords)
  6. Subject (-> Description)
  7. Creation Date (-> Create Date)
  8. Mod Date (-> Modify Date)
Property shouldn't be defined in xmp metadata if not present in document information dictionary.
Author:
Maksim Bezrukov
  • Method Details

    • doesInfoMatchXMP

      public static Boolean doesInfoMatchXMP(COSDocument document)
      Matches properties of document information dictionary and xmp metadata.
      Parameters:
      document - which will be tested
      Returns:
      true if fields of xmp matches with fields of info dictionary
    • getMetadataStream

      public static InputStream getMetadataStream(COSDocument document)
    • getStringWithoutTrailingZero

      public static String getStringWithoutTrailingZero(String string)