feat(ZUGFERD): Add dedicated ZUGFERD v1/v2 support and refine invoice format detection logic

This commit is contained in:
2025-04-03 20:08:02 +00:00
parent b4a95de482
commit 46331c2bf6
28 changed files with 1191 additions and 294 deletions

View File

@ -186,7 +186,8 @@ export class XInvoice {
*/
public async loadPdf(pdfBuffer: Uint8Array | Buffer, validate: boolean = false): Promise<XInvoice> {
try {
// Extract XML from PDF
// Extract XML from PDF using the consolidated extractor
// which tries multiple extraction methods in sequence
const xmlContent = await this.pdfExtractor.extractXml(pdfBuffer);
// Store the PDF buffer