Class PdfOptimizer.Options

  • Enclosing class:
    PdfOptimizer

    public static final class PdfOptimizer.Options
    extends java.lang.Object
    • Constructor Detail

      • Options

        public Options()
    • Method Detail

      • password

        public PdfOptimizer.Options password​(java.lang.String password)
        Password to open the input, if encrypted (user or owner password; empty/omitted tries an empty password).
      • encryptOutput

        public PdfOptimizer.Options encryptOutput​(java.lang.String userPassword,
                                                  java.lang.String ownerPassword)
        Encrypts the optimized output with AES-256, the modern default. For finer control use the PdfEncryptor.Options overload.
      • deduplicateContent

        public PdfOptimizer.Options deduplicateContent​(boolean deduplicateContent)
        Whether to merge byte-identical duplicate objects (e.g. the same font embedded twice) into one shared copy, on top of the always-on reachability cleanup. Default true; pass false to skip the extra content-hashing pass on a large document where every bit of processing time matters and duplicate content isn't expected.