mirror of
https://github.com/documenso/documenso.git
synced 2026-07-25 01:15:49 +10:00
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:
@@ -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());
|
await pdfDoc.reload(await legacy_pdfLibDoc.save());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user