Package com.pd4ml.pdf.optimizer
Class PdfOptimizeResult
- java.lang.Object
-
- com.pd4ml.pdf.optimizer.PdfOptimizeResult
-
public final class PdfOptimizeResult extends java.lang.ObjectOutcome of aPdfOptimizer.optimize(byte[])call: the rewritten PDF bytes plus before/after size and object-count stats, so a caller can tell how much (if anything) was actually cleaned up without re-parsing either file.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDuplicateObjectCount()OfgetRemovedObjectCount(), how many were removed specifically because they were byte-for-byte duplicates of another reachable object (e.g.intgetInputByteCount()intgetInputObjectCount()Total indirect objects in the input's object table -- includes ones no longer reachable, e.g.byte[]getOptimizedPdf()intgetOutputByteCount()intgetOutputObjectCount()Indirect objects in the optimized output -- always exactly those reachable from/Rootand/Info.intgetRemovedObjectCount()Objects that were dropped, whether because nothing reachable from/Root//Inforeferenced them, or because they were merged as duplicate content (seegetDuplicateObjectCount()).
-
-
-
Method Detail
-
getOptimizedPdf
public byte[] getOptimizedPdf()
-
getInputByteCount
public int getInputByteCount()
-
getOutputByteCount
public int getOutputByteCount()
-
getInputObjectCount
public int getInputObjectCount()
Total indirect objects in the input's object table -- includes ones no longer reachable, e.g. after an incremental-update edit.
-
getOutputObjectCount
public int getOutputObjectCount()
Indirect objects in the optimized output -- always exactly those reachable from/Rootand/Info.
-
getRemovedObjectCount
public int getRemovedObjectCount()
Objects that were dropped, whether because nothing reachable from/Root//Inforeferenced them, or because they were merged as duplicate content (seegetDuplicateObjectCount()).
-
getDuplicateObjectCount
public int getDuplicateObjectCount()
OfgetRemovedObjectCount(), how many were removed specifically because they were byte-for-byte duplicates of another reachable object (e.g. the same font or image embedded twice) that got merged into one shared copy -- as opposed to being simply unreferenced. Always0whenPdfOptimizer.Options.deduplicateContentwas turned off.
-
-