Package com.pd4ml.pdf.optimizer
Class PdfOptimizer.Options
- java.lang.Object
-
- com.pd4ml.pdf.optimizer.PdfOptimizer.Options
-
- Enclosing class:
- PdfOptimizer
public static final class PdfOptimizer.Options extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Options()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PdfOptimizer.OptionsdeduplicateContent(boolean deduplicateContent)Whether to merge byte-identical duplicate objects (e.g.PdfOptimizer.OptionsencryptOutput(PdfEncryptor.Options options)PdfOptimizer.OptionsencryptOutput(java.lang.String userPassword, java.lang.String ownerPassword)Encrypts the optimized output with AES-256, the modern default.PdfOptimizer.Optionspassword(java.lang.String password)Password to open the input, if encrypted (user or owner password; empty/omitted tries an empty password).
-
-
-
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 thePdfEncryptor.Optionsoverload.
-
encryptOutput
public PdfOptimizer.Options encryptOutput(PdfEncryptor.Options options)
-
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. Defaulttrue; passfalseto skip the extra content-hashing pass on a large document where every bit of processing time matters and duplicate content isn't expected.
-
-