mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 09:50:01 +00:00
Checks: drop "Authorized Signer", move signature label below the line
Removes the "Authorized Signer" text from the payee/address block, moves the "AUTHORIZED SIGNATURE" label to just below the signature line, and raises the signature image cap (0.42 -> 0.65 in) so the signature renders full size in the now-clear space above the line. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -271,11 +271,6 @@ function drawCheck(
|
|||||||
doc.setFontSize(9);
|
doc.setFontSize(9);
|
||||||
doc.setTextColor(0);
|
doc.setTextColor(0);
|
||||||
doc.text(c.payee, x(addrIndentX + dx), addrBlockY);
|
doc.text(c.payee, x(addrIndentX + dx), addrBlockY);
|
||||||
doc.setFont("helvetica", "normal");
|
|
||||||
doc.setFontSize(7.5);
|
|
||||||
doc.setTextColor(80);
|
|
||||||
doc.text("Authorized Signer", x(RIGHT + dx), addrBlockY, { align: "right" });
|
|
||||||
doc.setTextColor(0);
|
|
||||||
if (addrLines.length > 0) {
|
if (addrLines.length > 0) {
|
||||||
doc.setFont("helvetica", "normal");
|
doc.setFont("helvetica", "normal");
|
||||||
doc.setFontSize(8.5);
|
doc.setFontSize(8.5);
|
||||||
@@ -310,16 +305,13 @@ function drawCheck(
|
|||||||
if (!hid("signature")) {
|
if (!hid("signature")) {
|
||||||
const dx = ax("signature");
|
const dx = ax("signature");
|
||||||
const bottomLineY = y(bottomDy + ay("signature"));
|
const bottomLineY = y(bottomDy + ay("signature"));
|
||||||
doc.setFont("helvetica", "normal");
|
// Signature image — rendered full size above the line (bottom edge sits ON
|
||||||
doc.setFontSize(7);
|
// the line). With the label moved below the line, it can use the full height.
|
||||||
doc.setTextColor(80);
|
|
||||||
doc.text("AUTHORIZED SIGNATURE", x(sigCenterX + dx), bottomLineY - 0.36, { align: "center" });
|
|
||||||
doc.setTextColor(0);
|
|
||||||
if (c.printSignature && c.signatureDataUrl) {
|
if (c.printSignature && c.signatureDataUrl) {
|
||||||
try {
|
try {
|
||||||
const props = doc.getImageProperties(c.signatureDataUrl);
|
const props = doc.getImageProperties(c.signatureDataUrl);
|
||||||
const maxW = RIGHT - sigLabelX - 0.1;
|
const maxW = RIGHT - sigLabelX - 0.1;
|
||||||
const maxH = 0.42;
|
const maxH = 0.65;
|
||||||
const ratio = props.width / props.height;
|
const ratio = props.width / props.height;
|
||||||
let sigW = maxW;
|
let sigW = maxW;
|
||||||
let sigH = sigW / ratio;
|
let sigH = sigW / ratio;
|
||||||
@@ -329,7 +321,14 @@ function drawCheck(
|
|||||||
doc.addImage(c.signatureDataUrl, "PNG", sigX, sigY, sigW, sigH);
|
doc.addImage(c.signatureDataUrl, "PNG", sigX, sigY, sigW, sigH);
|
||||||
} catch { /* silent */ }
|
} catch { /* silent */ }
|
||||||
}
|
}
|
||||||
|
// Signature line
|
||||||
hline(doc, x(sigLabelX + dx), bottomLineY, x(RIGHT + dx));
|
hline(doc, x(sigLabelX + dx), bottomLineY, x(RIGHT + dx));
|
||||||
|
// "AUTHORIZED SIGNATURE" label below the line
|
||||||
|
doc.setFont("helvetica", "normal");
|
||||||
|
doc.setFontSize(7);
|
||||||
|
doc.setTextColor(80);
|
||||||
|
doc.text("AUTHORIZED SIGNATURE", x(sigCenterX + dx), bottomLineY + 0.13, { align: "center" });
|
||||||
|
doc.setTextColor(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── MICR line (X offset + separate MICR Y fine-tune) ──
|
// ── MICR line (X offset + separate MICR Y fine-tune) ──
|
||||||
|
|||||||
Reference in New Issue
Block a user