Antonio Manuel Muñiz wrote:
> Hello.
>
> I see in the doc that is possible to concatenate two pdf files, but the
> files must exist as file (in the file system)
No, they don't have to exist as a file.
There are examples on 1t3xt.info/examples/
where a ByteArrayOutputStream is used and PdfReader is created with
a byte[]. So replace:
PdfWriter.getInstance(document, new FileOutputStream("myfile.pdf"));
with
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PdfWriter.getInstance(document, baos);
And then later on replace:
PdfReader reader = new PdfReader("myfile.pdf");
with
PdfReader reader = new PdfReader(baos.toByteArray());
> Is possible to concatenate two Document objects? I have not found any
> reference in the documentation.
Look closer next time ;-)
--
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php