Skip to content

# PDFReplaceImageTransform

Namespace: O2S.Components.PDF4NET.Transforms

Defines a page transformation that allows to replace an image with another image.

    public class PDFReplaceImageTransform : PDFPageTransform

Inheritance Object → PDFPageTransform → PDFReplaceImageTransform

## Constructors

### PDFReplaceImageTransform()

Initializes a new PDFReplaceImageTransform object.

    public PDFReplaceImageTransform()

## Properties

### Context

Gets the transform context.

    public PDFContentStreamContainer Context { get; internal set; }

Property Value

PDFContentStreamContainer
The content stream container on which the transformation is currently applied.

### DecodeOldImage

Gets or sets a value indicating whether the old image will be decoded.

    public bool DecodeOldImage { get; set; }

Property Value

Boolean
If true the replaced image will be decoded so it can be saved and processed, if needed.

### EnableExtendedOperatorInformation

Gets or sets a flag indicating whether extended operator information should be extracted when a content stream operator is processed.

    public bool EnableExtendedOperatorInformation { get; set; }

Property Value

Boolean
True if extended operator information should be extracted.

## Events

### ReplaceImage

Gets or sets the event that is fired when an image needs to be replaced.

    public event EventHandler<PDFReplaceImageEventArgs> ReplaceImage;