function GetXfaTemplate: TBytes;
Retrieves the raw XML bytes representing the template packet from the document's XFA metadata structure
Requires the document to be active (Active property set to True)
template packet
var
TemplateBytes: TBytes;
begin
if not Pdf1.Active then Exit;
TemplateBytes := Pdf1.GetXfaTemplate;
// process template XML
end;