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.
      • linearize

        public PdfOptimizer.Options linearize​(boolean linearize)
        Whether to write the output linearized ("Fast Web View", ISO 32000-1 Annex F), so a viewer reading it over a network shows the first page, and then any other page, before the whole file has arrived. Default false. Inherited page attributes are moved to the pages. Cannot be combined with encryptOutput(java.lang.String, java.lang.String).
        Since:
        v4.2.0