fix(pdf): simplify footer to single line, use dark ZQ PNG logo

- Removed "faunosteo.com" text (logo alone is clickable)
- Replaced "In partnership with Paws iin Harmony" + separate handle
  with single "@paws.iin.harmony" link
- Swapped ZenQuality SVG for dark PNG (logo-horizontal-1024.png)
  which renders better on white pages
- Footer now: [Faunosteo logo] | [Powered by ZQ logo] | [@paws.iin.harmony]
  with page numbers below center

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bastien ChanotandClaude Opus 4.6 committed 2026-05-27 05:19:54 +02:00
1 parent 4075945668
commit cae585b564
5 files changed
+21 -115

No files matched your search

+1 -1
View File
@@ -112,7 +112,7 @@ export async function exportReportToPdf(
console.warn('Faunosteo logo embed failed:', err)
}
try {
const zqPngBytes = await loadZenqualityLogo(300)
const zqPngBytes = await loadZenqualityLogo()
zqLogoPdfImage = await pdfDoc.embedPng(zqPngBytes)
} catch (err) {
console.warn('ZenQuality logo embed failed:', err)
+15 -42
View File
@@ -6,7 +6,6 @@ import { addLinkAnnotation } from './linkAnnotation'
const MARGIN_X = 36
const FOOTER_BASE_Y = 20
const LINE_HEIGHT = 12
const FONT_SIZE = 8
export interface FooterAssets {
@@ -29,8 +28,8 @@ export function drawFooter(
const logoW = 60
const logoH = 23
const topRowY = FOOTER_BASE_Y + LINE_HEIGHT + 2
const separatorY = topRowY + logoH + 6
const rowY = FOOTER_BASE_Y + 14
const separatorY = rowY + logoH + 6
page.drawLine({
start: { x: MARGIN_X, y: separatorY },
@@ -42,35 +41,18 @@ export function drawFooter(
if (assets.logoPng) {
page.drawImage(assets.logoPng, {
x: MARGIN_X,
y: topRowY,
y: rowY,
width: logoW,
height: logoH,
})
addLinkAnnotation(page, {
x: MARGIN_X,
y: topRowY,
y: rowY,
width: logoW,
height: logoH,
url: 'https://faunosteo.com',
})
}
const siteUrl = 'faunosteo.com'
const siteUrlX = MARGIN_X + (assets.logoPng ? logoW + 4 : 0)
const siteUrlW = fonts.bodyRegular.widthOfTextAtSize(siteUrl, FONT_SIZE)
page.drawText(siteUrl, {
x: siteUrlX,
y: topRowY + 6,
size: FONT_SIZE,
font: fonts.bodyRegular,
color: accent,
})
addLinkAnnotation(page, {
x: siteUrlX,
y: topRowY + 4,
width: siteUrlW,
height: FONT_SIZE + 4,
url: 'https://faunosteo.com',
})
const poweredLabel = `${dict['footer.powered_by']} `
const poweredLabelW = fonts.bodyRegular.widthOfTextAtSize(poweredLabel, FONT_SIZE)
@@ -82,10 +64,11 @@ export function drawFooter(
? poweredLabelW + zqLogoW
: poweredLabelW + zqFallbackW
const poweredX = (width - poweredBlockW) / 2
const textBaseY = rowY + 6
page.drawText(poweredLabel, {
x: poweredX,
y: topRowY + 6,
y: textBaseY,
size: FONT_SIZE,
font: fonts.bodyRegular,
color: muted,
@@ -94,13 +77,13 @@ export function drawFooter(
if (assets.zqLogoPng) {
page.drawImage(assets.zqLogoPng, {
x: zqX,
y: topRowY + 2,
y: rowY + 2,
width: zqLogoW,
height: zqLogoH,
})
addLinkAnnotation(page, {
x: zqX,
y: topRowY + 2,
y: rowY + 2,
width: zqLogoW,
height: zqLogoH,
url: 'https://zenquality.fr',
@@ -108,43 +91,33 @@ export function drawFooter(
} else {
page.drawText(zqFallback, {
x: zqX,
y: topRowY + 6,
y: textBaseY,
size: FONT_SIZE,
font: fonts.bodyRegular,
color: accent,
})
addLinkAnnotation(page, {
x: zqX,
y: topRowY + 4,
y: textBaseY - 2,
width: zqFallbackW,
height: FONT_SIZE + 4,
url: 'https://zenquality.fr',
})
}
const partnerText = `${dict['footer.in_partnership']} Paws iin Harmony`
const partnerW = fonts.bodyRegular.widthOfTextAtSize(partnerText, FONT_SIZE)
page.drawText(partnerText, {
x: width - MARGIN_X - partnerW,
y: topRowY + 6,
size: FONT_SIZE,
font: fonts.bodyRegular,
color: muted,
})
const instagramHandle = '@paws.iin.harmony'
const handleW = fonts.bodyRegular.widthOfTextAtSize(instagramHandle, FONT_SIZE)
const handle = '@paws.iin.harmony'
const handleW = fonts.bodyRegular.widthOfTextAtSize(handle, FONT_SIZE)
const handleX = width - MARGIN_X - handleW
page.drawText(instagramHandle, {
page.drawText(handle, {
x: handleX,
y: FOOTER_BASE_Y + 2,
y: textBaseY,
size: FONT_SIZE,
font: fonts.bodyRegular,
color: accent,
})
addLinkAnnotation(page, {
x: handleX,
y: FOOTER_BASE_Y,
y: textBaseY - 2,
width: handleW,
height: FONT_SIZE + 4,
url: 'https://www.instagram.com/paws.iin.harmony',
+5 -3
View File
@@ -1,5 +1,5 @@
const FAUNOSTEO_LOGO = '/logo-horizontal.svg'
const ZENQUALITY_LOGO = '/brand/zenquality-logo.svg'
const ZENQUALITY_LOGO = '/brand/zenquality-logo-dark.png'
async function rasterizeSvgToCanvas(
svgString: string,
@@ -75,6 +75,8 @@ export async function loadFaunosteoLogo(widthPx: number): Promise<Uint8Array> {
return loadSvgLogoPng(FAUNOSTEO_LOGO, widthPx, '0 0 1070 410')
}
export async function loadZenqualityLogo(widthPx: number): Promise<Uint8Array> {
return loadSvgLogoPng(ZENQUALITY_LOGO, widthPx, '0 0 400 100')
export async function loadZenqualityLogo(): Promise<Uint8Array> {
const resp = await fetch(ZENQUALITY_LOGO)
if (!resp.ok) throw new Error(`ZQ logo fetch failed: HTTP ${resp.status}`)
return new Uint8Array(await resp.arrayBuffer())
}