Hi,
I am writing an application for my bachelor thesis that inserts data collected by web forms into official PDF files from my university.
There are some cases where you need to fill out more than one document so I want to append these files dynamically if needed.
To fill out the form I use the pdf-form-fill.js from your website which works quite well for the main PDF file, but the AcroForm Object of all PDF files I append to it are removed.
I've also tried creating new pages in the original PDF and embedding the other files pages but this does't help either. If I exclude the fillForm(...) and just append the PDF files the AcroForms are also missing.
Here are the relevant parts of my code
const writer = hummus.createWriterToModify(
new hummus.PDFRStreamForFile(sourcePDF),
new hummus.PDFStreamForResponse(res)
);
// ...
pdfFiles.forEach(file => {
// checked if conditions for this file apply
writer.appendPDFPagesFromPDF(file.path);
});
// ...
fillForm(writer, data, () => {
writer.end();
res.end();
});
Thanks for the help and this awesome library!
Hi, I am writing an application for my bachelor thesis that inserts data collected by web forms into official PDF files from my university. There are some cases where you need to fill out more than one document so I want to append these files dynamically if needed. To fill out the form I use the pdf-form-fill.js from your website which works quite well for the main PDF file, but the AcroForm Object of all PDF files I append to it are removed. I've also tried creating new pages in the original PDF and embedding the other files pages but this does't help either. If I exclude the
fillForm(...)
and just append the PDF files the AcroForms are also missing.Here are the relevant parts of my code