Skip to content

Latest commit

 

History

History

ReplaceImage

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Replace image

This sample shows how to replace images in PDF documents using C# or VB.NET and Docotic.Pdf library.

Description

Use one of the PdfImage.ReplaceWith methods to replace all occurrences of the image within the PDF document.

These methods throw an UnsupportedImageException when used on an inline image. To avoid the exception, check the PdfImage.IsInline property before replacing the image. You can convert inline images using one of the PdfCanvas.MoveInlineImagesToResources methods before replacing any of them.

Replacing an image can cause unexpected and/or unpleasant visual results. For example, if you replace a mask image or an image that has a mask, it can break image masking effects.

See also