PDFium Delphi Component Docs

DetachFormObjectChild method

Component: TPdf  ·  Unit: PDFium
Transfers one child out of a form object and returns ownership to the caller

Syntax

function DetachFormObjectChild(FormIndex, ChildIndex: Integer): FPDF_PAGEOBJECT;

Description

DetachFormObjectChild removes the child at ChildIndex from the form object at FormIndex and returns its native page-object handle

The caller owns the returned handle until it is inserted into the page with InsertObjectAtIndex or destroyed; out-of-range indexes or non-form objects raise EPdfError

Remarks

Example

Child := Pdf1.DetachFormObjectChild(FormIdx, ChildIdx);
if Child <> nil then
  Pdf1.InsertObjectAtIndex(Pdf1.ObjectCount, Child);

See Also

FormObjectChildren, InsertFormObjectFromXObject, Advanced page content