Files
klz-cables.com/.pnpm-store/v10/files/7f/91ebc45537883442955c69700471ede8040f252aeab7dc0a437193f9db5dd4ddbdd4e543479b7d58121059590b3307c139879270ab4bf85313d8bfae797a65
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

16 lines
511 B
Plaintext

export function validatePDF(buffer) {
// Check for PDF header
const header = buffer.subarray(0, 8).toString('latin1');
if (!header.startsWith('%PDF-')) {
return false;
}
// Check for EOF marker and xref table
const endSize = Math.min(1024, buffer.length);
const end = buffer.subarray(buffer.length - endSize).toString('latin1');
if (!end.includes('%%EOF') || !end.includes('xref')) {
return false;
}
return true;
}
//# sourceMappingURL=validatePDF.js.map