Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
9f974c7f73
commit
0eea828452
@@ -302,6 +302,38 @@ export function buildPleadingDoc(input: PleadingInput): Document {
|
||||
input.body.split("\n").forEach((line) => bodyParagraphs.push(p(line)));
|
||||
}
|
||||
|
||||
// Signature block (above footnotes, after body)
|
||||
const sig = input.signature;
|
||||
if (sig && (sig.block?.trim() || sig.imageBytes)) {
|
||||
bodyParagraphs.push(emptyP());
|
||||
bodyParagraphs.push(emptyP());
|
||||
if (sig.imageBytes) {
|
||||
const data =
|
||||
sig.imageBytes instanceof Uint8Array
|
||||
? sig.imageBytes
|
||||
: new Uint8Array(sig.imageBytes);
|
||||
bodyParagraphs.push(
|
||||
new Paragraph({
|
||||
children: [
|
||||
new ImageRun({
|
||||
type: (sig.imageType as any) || "png",
|
||||
data,
|
||||
transformation: { width: 220, height: 70 },
|
||||
altText: { title: "Signature", description: "Attorney signature", name: "signature" },
|
||||
}),
|
||||
],
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
// Reserve vertical space for a wet signature
|
||||
bodyParagraphs.push(emptyP());
|
||||
bodyParagraphs.push(emptyP());
|
||||
}
|
||||
// Signature line (underscore rule, ~3 inches)
|
||||
bodyParagraphs.push(p("_______________________________"));
|
||||
sig.block.split("\n").forEach((line) => bodyParagraphs.push(p(line)));
|
||||
}
|
||||
|
||||
// Footnotes rendered as endnote-style block at bottom of document
|
||||
const footnotes = (input.footnotes || []).filter((f) => f.text.trim().length > 0);
|
||||
if (footnotes.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user