PdfPage.RemovePaths Method

Removes some or all vector paths drawn on the page depending on a provided predicate.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)


public void RemovePaths(
	Predicate<PdfPath> remove
Public Sub RemovePaths ( 
	remove As Predicate(Of PdfPath)


Type: System.Predicate<PdfPath>
The predicate that determines whether to remove a path or not.


ArgumentNullExceptionremove is null.


If the predicate pointed to by parameter remove returns true for a path then the path will be removed from the page. If the predicate returns false then the path will stay on the page.

The method calls the predicate for paths drawn directly on the page, including invisible (clipped, obscured) paths.

The method does not call the predicate for paths in XObjects. Therefore, this method does not remove paths from XObjects.

The method calls the predicate according to the drawing order of the paths. If path A is drawn earlier than path B then the predicate will be first invoked for path A and then for path B.

See Also