Hello Tilman!

Thank you for your quick response. Ist is now working fine. Thank you very much.


Kind regards,
Siegfried
-
Siegfried Gstöttner
[email protected]


-----Ursprüngliche Nachricht-----
Von: Tilman Hausherr [mailto:[email protected]] 
Gesendet: Donnerstag, 28. Juli 2016 08:01
An: [email protected]
Betreff: Re: Problem with PDFMergerExample()

Am 28.07.2016 um 07:41 schrieb Gstöttner Siegfried:
> The "doc" in "oneDocSerial" is the main document originally loaded from a 
> file. Then an adress is added to this document. Could you please tell me how 
> to convert the result into avalid InputStream to get your example working?

Do this:


ByteArrayOutputStream baos = new ByteArrayOutputStream();

doc.save(baos);

doc.close(); // possibly much later, depending if doc uses resources from other 
documents!

ByteArrayInputStream bais = new ByteArrayInputStrea(baos.toByteArray());

bais is now an input stream.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to