fix: checkbox states not showing in signed PDF for legacy uploads

Flatten the pdf-lib form before saving to bake checkbox/radio appearances
  into the PDF content. This ensures checked states are preserved when the
  PDF is subsequently processed by libpdf for final signing.
This commit is contained in:
Catalin Pit
2026-01-30 14:39:06 +02:00
parent 39ebc8184a
commit aed55e9bcd
@@ -388,6 +388,11 @@ const decorateAndSignPdf = async ({
}
}
// Flatten the form to bake checkbox/radio appearances into the PDF content
// This ensures proper rendering when the PDF is processed by libpdf
const form = legacy_pdfLibDoc.getForm();
form.flatten();
await pdfDoc.reload(await legacy_pdfLibDoc.save());
}