DetectFacturXInvoice
Document properties
Description
Checks whether the current document contains recognizable e-invoice XML and reads the basic identifiers from XMP and XML metadata
Syntax
Delphi
Function TPDFlib.DetectFacturXInvoice: Integer;
Return values
| 0 | No recognizable e-invoice XML was found |
|---|---|
| 1 | Recognizable e-invoice XML was found |
Remarks
Detection first uses the XMP DocumentFileName value, then tries factur-x.xml, xrechnung.xml, zugferd-invoice.xml, and ZUGFeRD-invoice.xml
After a successful call, use GetFacturXInvoiceInfo to read the file name, version, conformance level, guideline ID, and /AFRelationship
Example
// Check whether the loaded PDF carries invoice XML
begin
if PDF.DetectFacturXInvoice = 1 then
InvoiceFileName := PDF.GetFacturXInvoiceInfo(1);
end;
See also
GetFacturXInvoiceInfo, ValidateFacturXInvoice, ExtractFacturXXMLToString