When that happens you should have a look at 'result' and see what's
really there. It looks like in those cases 'result' is not a pdf.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of vadim zabejinsky
> Sent: Monday, May 02, 2005 10:08 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Problem whith merge pdfs
> 
> Hi I have a problem
> Sometimes I get error message.
> 
> java.io.IOException: PDF header signature not found.
> at
> com.lowagie.text.pdf.PRTokeniser.checkPdfHeader(Unknown
> Source)
> at com.lowagie.text.pdf.PdfReader.readPdf(Unknown
> Source)
> 
> My application uses multithreading for building
> reports. 
> Each thread return result=baos.toByteArray();
> 
> Here is the code to add result to end document
> 
> PdfReader reader = new PdfReader(result);
> reader.consolidateNamedDestinations();
> int pages = reader.getNumberOfPages();
> PdfContentByte cb = pdfWriter.getDirectContent();
> PdfImportedPage page;
> for (int i=0; i<pages; )
>  {
>    ++i;         
>    document.newPage();
>    page= pdfWriter.getImportedPage(reader,i);
>    cb.addTemplate(page,1f,0,0,1f,0,0);
>  }
> 
> this error occure from time to time with no
> consistency
> can somebody help with this?
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4 
> great events, 4
> opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r 
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to