PdfContentEditor.ReplaceImage

PdfContentEditor.ReplaceImage method

Replaces the specified image on the specified page of PDF document with another image.

public void ReplaceImage(int pageNumber, int index, string imageFile)
ParameterTypeDescription
pageNumberInt32The number of page on which the image is replaced.
indexInt32The index of the image object must be replaced.
imageFileStringThe image file will be used for replacing.

Examples

PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf("example.pdf");
editor.ReplaceImage(1, 1, "image.jpg");
editor.Save("example_out.pdf");

See Also