Click or drag to resize

ContentReplacerAddImage Method

Replace the image that best fits 'target_region' with 'replacement_image'.

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public void AddImage(
	Rect target_region,
	Obj replacement_image
)

Parameters

target_region
Type: pdftron.PDFRect
The rectangle defining the area in which an image that best fits the rectangle will be replaced by 'replacement_image'.
replacement_image
Type: pdftron.SDFObj
The 'SDF.Obj' of a 'PDF.Image' object.
Remarks
The best fit is the image that closest matches 'target_region'. For example if there are two images on the page, one taking up the entire page, and the other smaller, and the smaller one has similar dimensions and position of 'target_region', then the smaller image would be replaced, not the larger. Furthermore, if 'target_region' encloses multiple images, then only the image with the largest area will be replaced.
See Also