Now the documents are being loaded. But the final document doesn't contain
the PDF files. What could be happening?
//obter documento base
OutputStream outBase = new ByteArrayOutputStream();
IOUtils.copy(docBase,outBase);
PdfCopyMerge docComposto = new PdfCopyMerge(outBase);
Iterator it = colecao.iterator();
while(it.hasNext())
{
InputStream inFile = (FileInputStream)it.next();
ByteArrayOutputStream saida = new ByteArrayOutputStream();
IOUtils.copy(inFile,saida);
PdfReader doc = new PdfReader(saida.toByteArray());
docComposto.addDocument(doc);
docComposto.flush();
saida.close();
inFile.close();
}
docComposto.close();
}
*****************************************************
* Federal University of Minas Gerais *
* Department of Computer Science *
* Master Degree in Computer Science *
* *
* Fundação Getulio Vargas *
* MBA in Project Management *
* *
* Aloizio Silva *
* http://www.dcc.ufmg.br/~aloizio *
* *
* Mobile Computer and Network Optimization *
*****************************************************
On Wed, 30 Aug 2006, Paulo Soares wrote:
> Who knows what is in the byte array? Output it to a file and look at what
> you get.
>
> Paulo
>
> ----- Original Message -----
> From: "Aloizio Pereira da Silva" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Wednesday, August 30, 2006 7:30 PM
> Subject: [iText-questions] PDF Header signature not found
>
>
> I am using
>
> ByteArrayOutputStream saida = new ByteArrayOutputStream();
> IOUtils.copy(inFile,saida);
> PdfReader doc = new PdfReader(saida.toByteArray()); (the error
> happens in this line)
>
> If I put the url everything is ok. Why doesn't work with byteArray?
>
>
> *****************************************************
> * Federal University of Minas Gerais *
> * Department of Computer Science *
> * Master Degree in Computer Science *
> * *
> * Fundação Getulio Vargas *
> * MBA in Project Management *
> * *
> * Aloizio Silva *
> * http://www.dcc.ufmg.br/~aloizio *
> * *
> * Mobile Computer and Network Optimization *
> *****************************************************
>
>
> --------------------------------------------------------------------------------
>
>
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
>
> --------------------------------------------------------------------------------
>
>
> > _______________________________________________
> > iText-questions mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> -------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions