Free Support Forum - "PDF header signature error." when using PdfFileStamp


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 "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.


PdfFileStamp fileStamp = new PdfFileStamp("generated.pdf", "generated_stamped.pdf");

Stamp pdfFileStamp = new Stamp();
pdfFileStamp.bindPdf("template.pdf", 1);


Hi Ben,

for using our products.<o:p></o:p>

I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFKITJAVA-33289. We will investigate this issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

Thank you for your quick response.

Is there a workaround to get this functionality working, such as producing the stamp PDFs with a different product?


Hi Ben,

Thanks for you inquiry. As a workaround you can convert Pdf document to image and use for stamping. Hopefully it will serve the purpose.

However, we will keep you updated regarding reported issue progress via this forum thread.

Sorry for the inconvenience faced.

Best Regards,