initial commit

This commit is contained in:
nxglabs
2023-10-22 01:37:25 +05:30
parent 80327652c3
commit 97fd28697a
182 changed files with 55033 additions and 122 deletions
@@ -0,0 +1,15 @@
import getIndexFromRef from './getIndexFromRef.js';
const createBufferRootWithAcroform = (pdf, info, form) => {
const rootIndex = getIndexFromRef(info.xref, info.rootRef);
return Buffer.concat([
Buffer.from(`${rootIndex} 0 obj\n`),
Buffer.from('<<\n'),
Buffer.from(`${info.root}\n`),
Buffer.from(`/AcroForm ${form}`),
Buffer.from('\n>>\nendobj\n'),
]);
};
export default createBufferRootWithAcroform;