iText - PDF header signature not found

Hi, this is just to help someone that may end up in a similar position.

We have been testing iText to produce PDF’s in Notes. All was working well and then we ran into the following error:

java.io.IOException: PDF header signature not found.

at com.lowagie.text.pdf.PRTokeniser.checkPdfHeader(PRTokeniser.java:201)

at com.lowagie.text.pdf.PdfReader.readPdf(PdfReader.java:487)

at com.lowagie.text.pdf.PdfReader.<init>(PdfReader.java:162)

at com.lowagie.text.pdf.PdfReader.<init>(PdfReader.java:151)

at com.lowagie.examples.general.copystamp.JavaAgent.NotesMain(JavaAgent.java:40)

at lotus.domino.AgentBase.runNotes(Unknown Source)

at lotus.domino.NotesThread.run(Unknown Source)

I was not able to locate a reasonable reason as to why and how to fix it.

We retrieve our pdf template which resides inside the file resource section of the notes database via http as its about the only way to get a handle on it. What I noticed was that when the database changed to am SSL requirement we ran int this error.

Hope this helps you.