PeachDrawing.PDF.PdfComposer

PdfComposer.ConsolidateImages() Method

Merges embedded raster images that encode to byte-identical PDF image objects, keeping one copy and pointing every other reference at it. Call it after all pages are drawn and before Save(Stream): the saved file then drops the duplicates.

public void ConsolidateImages();

Remarks

Repeated references to the same image source within one canvas’s work already share one embedded image. This is for what that does not cover: the same image drawn on separate pages by separate work, or two sources that happen to encode identically. It is not run automatically, since hashing every embedded image is not a cost most documents should pay on every save.