mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 01:16:40 +02:00
Root causes identified via DB hex-dump and server logs:
1. Tab character in budget lines: DB stores e.g. `**Budget Verantwortung:**\t750.000 EUR`
(byte 0x09 between `:**` and the amount). PDFKit can't render \t in WinAnsiEncoding,
producing garbage output like `"sSãUU`. Fix: `.replace(/\t/g, ' ')` in cleaned text.
2. Unconditional bullet: `\u2022 ${sanitize(hasBullet ? cleaned : cleaned)}` always
prepended `•` — the ternary was a no-op. Fix: only add `•` when hasBullet is true;
`**...**` header lines now render as Helvetica-Bold without a bullet.
3. ITIL4 Foundation Cert.pdf is owner-password-encrypted. pdf-lib threw
"Input document is encrypted" → cert was silently skipped.
Fix: `PdfLib.load(attBuffer, { ignoreEncryption: true })`.
Applies to both PDF and DOCX export paths.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| core-service | ||
| crm-service | ||
| frontend | ||