Hello,
I'm trying to use the PdfFileStamp class to use another PDF as a background for a PDF file. Code below. However, if the stamp is a PDF stamp, a java.io.IOException "PDF header signature error." is thrown when close() is called.
I have tried two different PDF files to act as the stamp, both attached. One is generated by the Mac OS X "print to PDF" function, the other by LibreOffice.
Ben
PdfFileStamp fileStamp = new PdfFileStamp("generated.pdf", "generated_stamped.pdf");
Stamp pdfFileStamp = new Stamp();
pdfFileStamp.bindPdf("template.pdf", 1);
pdfFileStamp.isBackground(true);
fileStamp.addStamp(pdfFileStamp)
fileStamp.close()