mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-22 07:32:31 +02:00
initial commit
This commit is contained in:
+15
@@ -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;
|
||||
Reference in New Issue
Block a user