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)

Syntax

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

Parameters

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

Exceptions

ExceptionCondition
ArgumentNullExceptionremove is null.

Remarks

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