Compress

Compress class

Represents a group of methods intended to compress Presentation.

Compress

NameDescription
Compress()

Returns: Compress


compressEmbeddedFonts

NameDescription
compressEmbeddedFonts (Presentation)Makes compression of the Presentation by removing unused characters from embedded fonts.

Parameters:

NameTypeDescription
presPresentationThe presentation instance

compressImages

NameDescription
compressImages (Presentation, int)Reduces the resolution of pictures in the presentation and deletes their cropped areas, similar to PowerPoint’s “Compress Pictures” applied to all pictures. Pictures on slides, layout slides and master slides are processed, including pictures inside group shapes and picture fills of shapes.

Parameters:

NameTypeDescription
presentationPresentationThe presentation to process.
resolutionintTarget resolution relative to the size at which each picture is displayed. PicturesCompression#DocumentResolution leaves pictures unchanged. Pictures already at or below the target resolution are left unchanged; pictures are never upscaled. Not processed: slide backgrounds, table cell fills, charts, SmartArt, GIF images (to preserve animation), SVG and metafile (EMF/WMF) images. Cropped areas are removed permanently and cannot be restored in PowerPoint.

Error

ErrorCondition
ArgumentNullExceptionpresentation is null.

compressPresentation

NameDescription
compressPresentation (Presentation)Reduces the size of a presentation by applying all available compression steps: Removes unused master slides #removeUnusedMasterSlides(Presentation).Removes unused layout slides #removeUnusedLayoutSlides(Presentation).Keeps only the glyphs actually used in embedded fonts #compressEmbeddedFonts(Presentation).Reduces picture resolution to 150 DPI and deletes cropped areas of pictures #compressImages(IPresentation,int).

Parameters:

NameTypeDescription
presentationPresentationThe presentation to compress. To customize compression, for example to use a different picture resolution or to skip a step, call the functions listed above individually instead of this one. Cropped areas of pictures are removed permanently and cannot be restored in PowerPoint.

Error

ErrorCondition
ArgumentNullExceptionpresentation is null.

removeUnusedLayoutSlides

NameDescription
removeUnusedLayoutSlides (Presentation)Makes compression of the Presentation by removing unused layout slides.

Parameters:

NameTypeDescription
presPresentationThe presentation instance

removeUnusedMasterSlides

NameDescription
removeUnusedMasterSlides (Presentation)Makes compression of the Presentation by removing unused master slides.

Parameters:

NameTypeDescription
presPresentationThe presentation instance