public void RemovePaintedImages( Predicate<PdfPaintedImage> remove )
Public Sub RemovePaintedImages ( remove As Predicate(Of PdfPaintedImage) )
|ArgumentNullException||remove is null.|
If the predicate pointed to by parameter remove returns true for a painted image then the image will be removed from the page. If the predicate returns 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.