Class FileIDGenerator

    • Constructor Detail

      • FileIDGenerator

        FileIDGenerator()
    • Method Detail

      • getOriginalFileID

        abstract byte[] getOriginalFileID()
      • getUpdatedFileID

        abstract byte[] getUpdatedFileID()
      • getRandomFileIDGenerator

        static FileIDGenerator getRandomFileIDGenerator()
        Use this method when the file ID is needed before the document is finalized. The digest method recommended by the PDF Reference is based, among other things, on the file size.
        Returns:
        an instance that generates a random sequence of bytes for the File Identifier
      • getDigestFileIDGenerator

        static FileIDGenerator getDigestFileIDGenerator​(PDFDocument document)
                                                 throws java.security.NoSuchAlgorithmException
        Returns an instance that generates a file ID using the digest method recommended by the PDF Reference. To properly follow the Reference, the size of the document must no longer change after this method is called.
        Parameters:
        document - the document whose File Identifier must be generated
        Returns:
        the generator
        Throws:
        java.security.NoSuchAlgorithmException - if the MD5 Digest algorithm is not available