|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
FDF header signature not foundhello,
With submitting PDF forms from a web browser, I sporadically have the following error:
Caused by: java.io.IOException: FDF header signature not found. at com.lowagie.text.pdf.PRTokeniser.checkFdfHeader(Unknown Source) at com.lowagie.text.pdf.FdfReader.readPdf(Unknown Source) at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source) at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source) at com.lowagie.text.pdf.FdfReader.<init>(Unknown Source) at ch.abacus.flow.lib.AbaWorkflow.submitPDFForm(AbaWorkflow.java:246) It is difficult to reproduce, sometime (most time) it works, but sometimes it fails. In the browser, the form looks fine, the fields can be edited. Something must happen on the post. If it fails, I can press the back button and submit again —--- and then it works.
In treating the post I do something like this:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buf=new byte[100*1024];
InputStream is = request.getInputStream(); while (is.read(buf) !=-1) { baos.write(buf); } try {
wf.submitPDFForm(wfId, sid, baos.toByteArray()); ....
I have no clue, what causes this error and would be glad if somebody helped me out.
Thank you
Regards
Hubert
------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@... https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ |
|
|
Re: FDF header signature not foundHubert,
Have you considered dumping baos.toByteArray() to an unique file whenever that exception occurs and inspect what actually has been submitted to your web application? Regards, Michael. |
|
|
Re: FDF header signature not foundMichael,
Will do that, thank you for the hint. It is not the first time I try do find this. When I investigated in the past I really found that the submitted data was shreddered. I am pretty sure this is not an iText issue and the error message is correct, but I haven't any clue what causes the data to be shreddered during the submit process. Hubert >>> mkl <mkl@...> 29.06.2009 12:04 >>> Hubert, Hubert Felber wrote: > > With submitting PDF forms from a web browser, I sporadically have the > following error: > > Caused by: java.io.IOException: FDF header signature not found. > > [...] > > It is difficult to reproduce, sometime (most time) it works, but sometimes > it fails. In the browser, the form looks fine, the fields can be edited. > Something must happen on the post. If it fails, I can press the back > button and submit again —--- and then it works. > > [...] > > try { > wf.submitPDFForm(wfId, sid, baos.toByteArray()); > .... > Have you considered dumping baos.toByteArray() to an unique file whenever that exception occurs and inspect what actually has been submitted to your web application? Regards, Michael. -- View this message in context: http://www.nabble.com/FDF-header-signature-not-found-tp24251014p24251481.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@... https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@... https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ |
|
|
Re: FDF header signature not foundTo be more specific with my question:
Under what circumstances would it be possible, that my data gets shreddered on the submit process? What must I do wrong to achieve this. Can I do something wrong during PDF preparation? I do some setValue, make some fields readonly and change the URL of the submit button. Regards Hubert >>> "Hubert Felber" <Hubert.Felber@...> 29.06.2009 14:02 >>> Michael, Will do that, thank you for the hint. It is not the first time I try do find this. When I investigated in the past I really found that the submitted data was shreddered. I am pretty sure this is not an iText issue and the error message is correct, but I haven't any clue what causes the data to be shreddered during the submit process. Hubert >>> mkl <mkl@...> 29.06.2009 12:04 >>> Hubert, Hubert Felber wrote: > > With submitting PDF forms from a web browser, I sporadically have the > following error: > > Caused by: java.io.IOException: FDF header signature not found. > > [...] > > It is difficult to reproduce, sometime (most time) it works, but sometimes > it fails. In the browser, the form looks fine, the fields can be edited. > Something must happen on the post. If it fails, I can press the back > button and submit again —--- and then it works. > > [...] > > try { > wf.submitPDFForm(wfId, sid, baos.toByteArray()); > .... > Have you considered dumping baos.toByteArray() to an unique file whenever that exception occurs and inspect what actually has been submitted to your web application? Regards, Michael. -- View this message in context: http://www.nabble.com/FDF-header-signature-not-found-tp24251014p24251481.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@... https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@... https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@... https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ |
|
|
Re: FDF header signature not foundHubert,
There are quite a lot of possible reasons. A look at a broken FDF, therefore, would likely be very helpful. Shreddered how exactly? Regards, Michael. |
| Free embeddable forum powered by Nabble | Forum Help |