fix: flatten pdf-lib form fields before sealing document (#2441)

- Fixes checkbox fields not displaying correctly in sealed documents by
calling `flatten()` on the pdf-lib form before saving
This commit is contained in:
Lucas Smith
2026-02-03 14:24:23 +11:00
committed by GitHub
parent 594a0f0c3f
commit 1669216a91
@@ -388,6 +388,10 @@ const decorateAndSignPdf = async ({
}
}
// Should never run into issues with this flatten since all
// arcoFields are created by pdf-lib itself.
legacy_pdfLibDoc.getForm().flatten();
await pdfDoc.reload(await legacy_pdfLibDoc.save());
}