We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF File Streaming Issue


We have a streaming issue given the following scenario:

1. We create a PDF using the PDF API which includes Text, Images and some Tables
2. We call the method save() on the PDF Class with a ByteArrayOutputStream and persist to disk
3. We call the method save() on the PDF Class with a FileOutputStream and persist to disk

For the BAOS, it only persists the Text in the PDF and loses the Images and Tables, although the placeholders for these missing items are in the PDF. By this I mean that where a Table or Image should’ve been, there is a blank area depicting the same. Furthermore, we can confirm that Images and Tables are actually NOT in the persisted PDF file since the file is much smaller
than its FOS counterpart.

For the FOS it works as expected and saves the PDF with everything intact.

We want to use a BAOS in order to stream the information to other components as opposed to persisting it first and then streaming it elsewhere. The latter works, but we don’t want to have to manage files when BAOS are available.

Please treat this matter as urgent.

Thank you.

Hi Eugene,

Thanks for your inquiry. I’m afraid while using Aspose.Pdf for Java 3.3.0, I’m unable to notice reported issue with ByteArrayOutputStream. Please upgrade to latest Aspose.Pdf for Java API, hopefully your issue will be resolved. If issue persist then please share your sample code here and output file here, so we will look into it and provide you more information accordingly.

Sorry for the inconvenience faced.

Best Regards,


Thanks for your reply.

I will verify matters with my Development Team and revert asap.
You’ll hear from us either way.

Thanks again.