C4-Kuvert (quer) als Render-Format
All checks were successful
Build & Deploy / deploy (push) Successful in 11s

Neues Umschlag-Format c4 (324x229 mm, Querformat-Beschriftung, maschinenseitig
quer eingelegt) in den Backend-Defaults + ENVELOPE_FORMAT-Map. Absender oben
links, Empfaenger unten rechts (bestehende Kuvert-Logik, proportional).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
s4luorth
2026-09-30 11:31:25 +02:00
parent 7930c177ee
commit a882bf37f5
2 changed files with 5 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ const { replacePlaceholders } = require('../../services/placeholder-service');
// Directus-Formatschlüssel → Backend-Formate // Directus-Formatschlüssel → Backend-Formate
const LETTER_FORMAT = { a4: 'a4', a6_hoch: 'a6p', a6_quer: 'a6l' }; const LETTER_FORMAT = { a4: 'a4', a6_hoch: 'a6p', a6_quer: 'a6l' };
const ENVELOPE_FORMAT = { c6: 'c6', dinlang: 'din_lang' }; const ENVELOPE_FORMAT = { c6: 'c6', dinlang: 'din_lang', c4: 'c4' };
/** Baut den Adressblock für einen Umschlag aus einer Empfängerzeile. */ /** Baut den Adressblock für einen Umschlag aus einer Empfängerzeile. */
function addressText(entry) { function addressText(entry) {

View File

@@ -19,6 +19,8 @@ const DEFAULT_FORMAT_LAYOUTS = {
a6l: { marginTopMm: 8, marginLeftMm: 8, marginBottomMm: 14, lineHeightFactor: 1.2 }, a6l: { marginTopMm: 8, marginLeftMm: 8, marginBottomMm: 14, lineHeightFactor: 1.2 },
din_lang: { marginTopMm: 50, marginLeftMm: 10, lineHeightFactor: 1.2 }, din_lang: { marginTopMm: 50, marginLeftMm: 10, lineHeightFactor: 1.2 },
c6: { marginTopMm: 60, marginLeftMm: 10, lineHeightFactor: 1.2 }, c6: { marginTopMm: 60, marginLeftMm: 10, lineHeightFactor: 1.2 },
// C4 quer (Querformat-Beschriftung, maschinenseitig quer eingelegt).
c4: { marginTopMm: 70, marginLeftMm: 20, lineHeightFactor: 1.2 },
}; };
const DEFAULT_PAGE_FORMATS = { const DEFAULT_PAGE_FORMATS = {
a4: { widthMm: 210, heightMm: 297 }, a4: { widthMm: 210, heightMm: 297 },
@@ -29,9 +31,10 @@ const DEFAULT_PAGE_FORMATS = {
a6l: { widthMm: 148, heightMm: 105 }, a6l: { widthMm: 148, heightMm: 105 },
din_lang: { widthMm: 220, heightMm: 110 }, din_lang: { widthMm: 220, heightMm: 110 },
c6: { widthMm: 162, heightMm: 114 }, c6: { widthMm: 162, heightMm: 114 },
c4: { widthMm: 324, heightMm: 229 },
}; };
// Art des Formats (brief/umschlag/postkarte) – steuert, WAS generiert wird. // Art des Formats (brief/umschlag/postkarte) – steuert, WAS generiert wird.
const DEFAULT_KINDS = { a4: 'brief', a5p: 'brief', a5l: 'brief', a6p: 'brief', a6l: 'brief', dinlang_karte: 'brief', din_lang: 'umschlag', c6: 'umschlag' }; const DEFAULT_KINDS = { a4: 'brief', a5p: 'brief', a5l: 'brief', a6p: 'brief', a6l: 'brief', dinlang_karte: 'brief', din_lang: 'umschlag', c6: 'umschlag', c4: 'umschlag' };
// Live-Cache (wird von applyRenderFormats ersetzt). Start = Defaults. // Live-Cache (wird von applyRenderFormats ersetzt). Start = Defaults.
let LINE_LIMITS = { ...DEFAULT_LINE_LIMITS }; let LINE_LIMITS = { ...DEFAULT_LINE_LIMITS };