mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-21 15:12:34 +02:00
minify all files required for signpdf
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
const createBufferTrailer=(f,r,e)=>{let o=[];return o[0]="0000000000 65535 f ",e.forEach((f,r)=>{f=("0000000000"+f).slice(-10);o[r+1]=r+` 1
|
||||
${f} 00000 n `}),o=o.filter(f=>void 0!==f),Buffer.concat([Buffer.from("xref\n"),Buffer.from(r.xref.startingIndex+` 1
|
||||
`),Buffer.from(o.join("\n")),Buffer.from("\ntrailer\n"),Buffer.from("<<\n"),Buffer.from(`/Size ${r.xref.maxIndex+1}
|
||||
`),Buffer.from(`/Root ${r.rootRef}
|
||||
`),Buffer.from(r.infoRef?`/Info ${r.infoRef}
|
||||
`:""),Buffer.from(`/Prev ${r.xRefPosition}
|
||||
`),Buffer.from(">>\n"),Buffer.from("startxref\n"),Buffer.from(f.length+`
|
||||
`),Buffer.from("%%EOF")])};export default createBufferTrailer;
|
||||
Reference in New Issue
Block a user