Removes some or all images drawn on the page depending on a provided predicate.
public void RemovePaintedImages(Predicate<PdfPaintedImage> remove)
The predicate that determines whether to remove a painted image or not.
If the predicate pointed to by parameter
for a painted image then the image will be removed from the page. If the predicate
false then the image will stay on the page.
The method calls the predicate for regular and inline images drawn directly on the page, including invisible (clipped, obscured) images.
The method does not call the predicate for images in XObjects. Therefore, this method does not remove images from XObjects.
The method calls the predicate according to the drawing order of the images. If image A is drawn earlier than image B then the predicate will be first invoked for image A and then for image B.
The same PdfImage may be drawn on the page multiple times. In that case, the predicate will be called multiple times with different PdfPaintedImage objects referencing the same base image in the Image property.