This commit is contained in:
seb
2026-10-15 04:02:34 +02:00
parent 8c55f899b5
commit f331625d63

View File

@@ -177,12 +177,6 @@ export function generateManifestPdf({
// ----------------------------------------------------
let y = 45;
// Company Title (Left)
doc.font('Helvetica-Bold')
.fontSize(16)
.fillColor(primaryColor)
.text(companyName, 45, y);
// Document Title (Right)
doc.font('Helvetica-Bold')
.fontSize(20)
@@ -200,20 +194,6 @@ export function generateManifestPdf({
.text(companyAddressLine, 45, y);
}
// Document Number under Document Title
const headerNumStr = `${config.numberPrefix} ${manifest.number || manifest.id}`;
let headerNumFontSize = 11;
const headerNumWidth = 250;
doc.font('Helvetica-Bold');
while (headerNumFontSize > 8 && doc.fontSize(headerNumFontSize).widthOfString(headerNumStr) > headerNumWidth) {
headerNumFontSize -= 0.5;
}
doc.fontSize(headerNumFontSize)
.fillColor(primaryColor)
.text(headerNumStr, 300, y, { align: 'right', width: headerNumWidth, lineBreak: false });
y += 18;
// Separator rule
doc.moveTo(45, y)
.lineTo(550, y)