GetInvoiceRulePackageInfoA
Requires the Small Business edition — in Delphi, C++Builder and Lazarus code create the library as TPDFlibSmallBusiness (unit PDFlibSmallBusiness) or TPDFlibEnterprise; the Small Business and Enterprise DLL and ActiveX builds provide it unchanged; the Single edition keeps the method, which returns 0, an empty string or False and sets LastErrorCode to 901 (PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)
E-invoicing
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to GetInvoiceRulePackageInfo and string arguments are interpreted using the current SetAnsiMode code page
Reads a rule package manifest, checks every listed file against its SHA-256 and returns the result, so an application can show or record which rule release it validates with
Syntax
Delphi
Function DLGetInvoiceRulePackageInfoA(InstanceID: Integer; PackageFile, PackageSHA256: PAnsiChar): PAnsiChar;
DLL
const char* DLGetInvoiceRulePackageInfoA(int InstanceID, const char* PackageFile, const char* PackageSHA256);
Parameters
| Parameter | Description |
|---|---|
| PackageFile | The rule package directory or its rulepackage.xml manifest |
| PackageSHA256 | The expected SHA-256 of the manifest, or empty |
Return values
A JSON object with manifest, sha256 (the manifest digest to pin), pinned, verified, standard, version, profile, syntax, schema, schematron, files and, when verification failed, error with code and message
Remarks
The manifest format is described for ValidateInvoiceBusinessRulesWithPackage. Error codes are RulePackage.Missing, RulePackage.Manifest, RulePackage.Path, RulePackage.Integrity and RulePackage.Digest
Example
Writeln(PDF.GetInvoiceRulePackageInfo('C:\Rules\EN16931-CII-1.3.16', ''));
See also
CreateInvoiceRulePackage, ValidateInvoiceBusinessRulesWithPackage