INSIGHT-MVP/packages/core-service
Thomas Reitz 1608f4e936 fix: PDF export — tab chars garbled, unconditional bullets, encrypted PDF attachments
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>
2026-03-14 13:56:57 +01:00
..
assets/icons feat: use PNG contact icons in PDF export instead of vector drawing 2026-03-09 20:11:40 +01:00
prisma feat(core+frontend): Profilzugriff-Gruppen für Admin mit delegierten Berechtigungen 2026-03-14 10:47:36 +01:00
src fix: PDF export — tab chars garbled, unconditional bullets, encrypted PDF attachments 2026-03-14 13:56:57 +01:00
.dockerignore feat: implement Sprint 1 Alpha - full stack with Docker, NestJS, React 2026-03-08 15:33:36 +01:00
Dockerfile fix: add bcrypt native module rebuild to Dockerfile 2026-03-08 16:42:06 +01:00
nest-cli.json feat: implement Sprint 1 Alpha - full stack with Docker, NestJS, React 2026-03-08 15:33:36 +01:00
package-lock.json fix(core): PDF-Anhänge korrekt einbetten via pdf-lib + Zeichenbereinigung verbessert 2026-03-14 11:23:03 +01:00
package.json fix(core): PDF-Anhänge korrekt einbetten via pdf-lib + Zeichenbereinigung verbessert 2026-03-14 11:23:03 +01:00
tsconfig.build.json feat: implement Sprint 1 Alpha - full stack with Docker, NestJS, React 2026-03-08 15:33:36 +01:00
tsconfig.json feat: implement Sprint 1 Alpha - full stack with Docker, NestJS, React 2026-03-08 15:33:36 +01:00