function DetachFormObjectChild(FormIndex, ChildIndex: Integer): FPDF_PAGEOBJECT;
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
FormObjectChildren to enumerate valid child indexes firstChild := Pdf1.DetachFormObjectChild(FormIdx, ChildIdx);
if Child <> nil then
Pdf1.InsertObjectAtIndex(Pdf1.ObjectCount, Child);