UNPKG

@casoon/invoice-generator

Version:

Generate PDF invoices, XRechnung XML, and ZUGFeRD PDF/A-3 from JSON data with TypeScript support

30 lines 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SalutationSection = void 0; class SalutationSection { constructor(doc, currentY) { this.doc = doc; this.currentY = currentY; } /** * Bereich 2: Ansprache zur Rechnung * DIN 5008: Mindestens 20mm Abstand zur Empfänger-Adresse */ draw(invoice) { // Rechnungstitel in gleicher Schriftgröße wie Ansprache this.doc.font('Helvetica-Bold') .fontSize(10) // Gleiche Schriftgröße wie Ansprache .text('Rechnung', 50, this.currentY, { continued: false }); this.currentY += 25; // Ansprache this.doc.font('Helvetica') .fontSize(10) .text(invoice.salutation.greeting, 50, this.currentY, { continued: false }); this.currentY += 15; this.doc.text(invoice.salutation.introduction, 50, this.currentY, { continued: false }); this.currentY += 25; return this.currentY; } } exports.SalutationSection = SalutationSection; //# sourceMappingURL=salutation-section.js.map