From 2b9b6ccbfcb0cd3198fdab60ee4810681f1e59d8 Mon Sep 17 00:00:00 2001 From: Benjamin Piouffle Date: Wed, 12 Feb 2025 12:24:44 +0100 Subject: [PATCH] fix(TaxForms/W9): Sign box position (#1098) --- lib/tax-forms/w9.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/tax-forms/w9.ts b/lib/tax-forms/w9.ts index 2778fe6b..29505160 100644 --- a/lib/tax-forms/w9.ts +++ b/lib/tax-forms/w9.ts @@ -81,12 +81,14 @@ export const fillW9TaxForm = async (pdfDoc: PDFDocument, values: W9TaxFormValues fillPDFFormFromValues(form, values, W9FieldsDefinition, font); + const signBoxY = 200; + // W9 don't have a dedicated date field, so we add it manually const firstPage = pdfDoc.getPage(0); - firstPage.drawText(moment().format('MM/DD/YYYY'), { x: 420, y: 235, size: 10, font }); + firstPage.drawText(moment().format('MM/DD/YYYY'), { x: 420, y: signBoxY, size: 10, font }); // Add date & signature if (values.isSigned) { - await addSignature(pdfDoc, signerFullName, { x: 140, y: 235, fallbackFont: font }); + await addSignature(pdfDoc, signerFullName, { x: 140, y: signBoxY, fallbackFont: font }); } };