Well,

After testing with last iText v1.3.5, the problem is still available :-(

I will give you next monday some pdf samples.
But i rather think that the problem comes from the fact that we pass only by 
ByteArrayOutputStreams.

For a first check, perhaps you could try this :
- create 2 pdfs and put them directly into ByteArrayOutputStream() (not 
FileOutputStream),
- close/flush all, null all variables except both 2 byteArrayOutputStreams,
- use a docreader = PdfReader(new 
java.io.ByteArrayInputStream(byteArrayOutputStream1.toByteArray()));
 + use a new Document(docreader.getPageSizeWithRotation(1));
- try to concatenate this with the 2nd byteArrayOutputStream2. Destination is 
again a byteArrayOutputStream3  by a new PdfCopy(document, notcryptedbaos);
- well the idea is not to pass by files.

I will try to give you some more stuff later.

-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de [EMAIL PROTECTED]
Envoyé : vendredi 21 octobre 2005 14:09
À : itext-questions@lists.sourceforge.net
Objet : RE: [iText-questions] Pdf Concatenation: NullPointerException on 
PdfWriter.getPdfIndirectReference

Yes, i was thinking like you after posting this email.
I'm currently using 1.3.0 iText version. 
I will try with the last 1.3.5 version. But unfortunately Sourceforge download 
service seems to be in heavy charge (no possibility to download itext-1.3.5.jar 
from http://prdownloads.sourceforge.net/itext/. Is there any alternative spot 
to obtain this version ?

Again thanks for your precious time.


-----Message d'origine-----
De : Paulo Soares [mailto:[EMAIL PROTECTED] Envoyé : vendredi 21 octobre 2005 
12:40 À : Nigaud, Christophe PH/FR/EXT; itext-questions@lists.sourceforge.net
Objet : RE: [iText-questions] Pdf Concatenation: NullPointerException on 
PdfWriter.getPdfIndirectReference

Are you using the latest release 1.3.5? If you are post the PDF. 

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> [EMAIL PROTECTED]
> Sent: Friday, October 21, 2005 11:23 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Pdf Concatenation: 
> NullPointerException on PdfWriter.getPdfIndirectReference
> 
> Hi all,
> 
> The sourceforge seems to be really slow... So, sorry if this question 
> has been already ask :
> I had a NullPointerException during a Pdf concatenation script, but 
> nothing seems to be really null outside the iText api ?
> 
> Is it possible because i use ByteArrayOutputStream instead of 
> FileOutputStream ?
> 
> java.lang.NullPointerException
> at
> com.lowagie.text.pdf.PdfWriter.getPdfIndirectReference(Unknown
>  Source)
> at com.lowagie.text.pdf.PdfImportedPage.<init>(Unknown Source) at 
> com.lowagie.text.pdf.PdfReaderInstance.getImportedPage(Unknown
>  Source)
> at com.lowagie.text.pdf.PdfCopy.getImportedPage(Unknown Source)
> 
> Here is part of the code... 
> 
> Document document = null;



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and 
more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to