DetectFacturXInvoice

Propriedades do documento

Descrição

Verifica se o documento atual contém XML de e-invoice reconhecível e lê os identificadores básicos dos metadados XMP e XML

Sintaxe

Delphi

Function TPDFlib.DetectFacturXInvoice: Integer;

Valores retornados

0No recognizable e-invoice XML was found
1Recognizable e-invoice XML was found

Observações

A detecção usa primeiro o valor DocumentFileName do XMP, depois tenta factur-x.xml, xrechnung.xml, zugferd-invoice.xml e ZUGFeRD-invoice.xml

Após uma chamada bem-sucedida, use GetFacturXInvoiceInfo para ler o nome do arquivo, a versão, o nível de conformidade, o ID do guideline e o /AFRelationship

Exemplo

// Check whether the loaded PDF carries invoice XML
begin
  if PDF.DetectFacturXInvoice = 1 then
    InvoiceFileName := PDF.GetFacturXInvoiceInfo(1);
end;

Veja também

GetFacturXInvoiceInfo, ValidateFacturXInvoice, ExtractFacturXXMLToString