DeletePageElement

Content stream editing

Description

Deletes the exact text, image placement, or painted path represented by an enumeration handle. The method reparses the source layer and verifies the captured instruction fingerprint before writing. Text bytes are removed while a numeric text advance preserves the position of following relative text

Syntax

Delphi

Function TPDFlib.DeletePageElement(ElementID: Integer): Integer;

ActiveX

Function PDFlib::DeletePageElement(ElementID As Long) As Long

DLL

int DLDeletePageElement(int InstanceID, int ElementID);

Parameters

ElementIDOpaque handle returned by GetEnumeratedPageElementID; it must belong to the selected document and match the layer fingerprint captured at enumeration

Return values

1The element was deleted and all snapshot handles were invalidated
0The handle is stale, the source changed, or the edit cannot preserve text layout safely