mirror of
https://github.com/documenso/documenso.git
synced 2026-07-24 17:04:12 +10:00
fix: add missing awaits for font normalization
This commit is contained in:
@@ -157,7 +157,7 @@ export const run = async ({
|
|||||||
|
|
||||||
// Normalize and flatten layers that could cause issues with the signature
|
// Normalize and flatten layers that could cause issues with the signature
|
||||||
normalizeSignatureAppearances(pdfDoc);
|
normalizeSignatureAppearances(pdfDoc);
|
||||||
flattenForm(pdfDoc);
|
await flattenForm(pdfDoc);
|
||||||
flattenAnnotations(pdfDoc);
|
flattenAnnotations(pdfDoc);
|
||||||
|
|
||||||
// Add rejection stamp if the document is rejected
|
// Add rejection stamp if the document is rejected
|
||||||
@@ -188,7 +188,7 @@ export const run = async ({
|
|||||||
|
|
||||||
// Re-flatten the form to handle our checkbox and radio fields that
|
// Re-flatten the form to handle our checkbox and radio fields that
|
||||||
// create native arcoFields
|
// create native arcoFields
|
||||||
flattenForm(pdfDoc);
|
await flattenForm(pdfDoc);
|
||||||
|
|
||||||
const pdfBytes = await pdfDoc.save();
|
const pdfBytes = await pdfDoc.save();
|
||||||
const pdfBuffer = await signPdf({ pdf: Buffer.from(pdfBytes) });
|
const pdfBuffer = await signPdf({ pdf: Buffer.from(pdfBytes) });
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export const normalizePdf = async (pdf: Buffer) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
removeOptionalContentGroups(pdfDoc);
|
removeOptionalContentGroups(pdfDoc);
|
||||||
flattenForm(pdfDoc);
|
await flattenForm(pdfDoc);
|
||||||
flattenAnnotations(pdfDoc);
|
flattenAnnotations(pdfDoc);
|
||||||
|
|
||||||
return Buffer.from(await pdfDoc.save());
|
return Buffer.from(await pdfDoc.save());
|
||||||
|
|||||||
Reference in New Issue
Block a user