stage 5-6
Build and Push Docker Image / build (push) Successful in 1m11s

This commit is contained in:
jason
2026-04-21 13:14:27 -05:00
parent fc5bce4868
commit 5847a175af
26 changed files with 3031 additions and 29 deletions
+13
View File
@@ -37,3 +37,16 @@ export async function renderQrPng(token: string): Promise<string> {
width: 256,
});
}
/**
* Same QR, but as a raw PNG buffer for embedding into pdf-lib documents.
* We bump width up so the vector→raster downscale at print time stays crisp;
* 512 px at 35 mm = ~370 dpi which beats any office printer we'll see.
*/
export async function renderQrPngBuffer(token: string, width = 512): Promise<Buffer> {
return QRCode.toBuffer(scanUrlForToken(token), {
errorCorrectionLevel: "M",
margin: 1,
width,
});
}