TPDFlibInvoiceBusinessValidation

Data types, invoices

Description

Validates an embedded invoice with a caller-supplied provider for ValidateInvoiceBusinessRules.

TPDFlib declares the public methods and a protected dispatch method for the business-rule validation of an embedded invoice. The edition class supplies the implementation as a callback of this type. A plain TPDFlib instance supplies none, so the call returns the documented empty result and sets LastErrorCode to PDFLIB_ERROR_SMALLBUSINESS_REQUIRED. Application code never declares, assigns or calls a value of this type.

Syntax

Delphi

TPDFlibInvoiceBusinessValidation = Function(Const EmbeddedFileName: WideString;
  Const Request: TPDFInvoiceValidationRequest; Const Provider: IPDFInvoiceValidationProvider;
  Out Report: TPDFInvoiceValidationReport): Boolean Of Object;

Parameters

EmbeddedFileNameFile name of the embedded invoice XML attachment to validate
RequestValidation request carrying the rule set, the schema and Schematron requirements, the timeout and the output size limit
ProviderProvider interface that executes the requested validation stages
ReportReceives the stage-by-stage validation report

Return values

TrueThe provider ran the requested validation stages; Report holds the results
FalseThe validation could not run

See also

TPDFlibInvoiceValidationMode, TPDFlibInvoiceValidationJSON, ValidateInvoiceBusinessRules