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

Free Support Forum - aspose.com

PDF Byte Array to HTML

What is the proper way to convert a pdf stored in a byte array to raw html? It would be preferable to have the html output stored as a String, but that is not completely necessary. I am currently creating a aspose.pdf.Document object using a ByteArrayInputStream as a parameter. This stream contains the bytes from the PDF. When I try to save the document to an output stream using the SaveFormat.Html option I get the following error:

class com.aspose.pdf.internal.p230.z6: Save a document to a html stream is not supported. Please use method save to the file.
com.aspose.pdf.ADocument.m1(Unknown Source)
com.aspose.pdf.Document.m1(Unknown Source)
com.aspose.pdf.ADocument.save(Unknown Source)
com.aspose.pdf.Document.save(Unknown Source)

I have no idea what exactly this error message means. I have seen other examples of save being used in a similar fashion.

Hi Kyle,


Thanks for your inquiry. As stated in error message, I am afraid subjected feature is not supported at the moment. Currently Aspose.Pdf for Java save html to disk only. However, we had already logged an issue PDFNEWJAVA-33956 in our issue tracking system for same. We have plan to implement it in near future. We will update you via this forum thread as soon it is implemented and gets available for download.

We are sorry for the inconvenience caused.

Best Regards,

Ok. Thank you. Would you happen to have a rough idea of when this feature might be implemented? I didn’t find anything in the documentation about this feature not yet being available, so we had not planned on creating a file on disk beforehand. Just to be completely confident on the current functionality, Aspose.Pdf for Java only supports writing to a file fileOutputStream at the moment, correct?

Hi Kyle,


<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
color:#333333;background:white”>The development team has been busy resolving
other priority issues and currently we cannot share any possible ETA regarding the implementation of this feature. Nevertheless, as soon as we have some updates regarding its resolution, I
would be more than happy to update you with the status of correction. Please be
patient and spare us little time.<o:p></o:p>

We are sorry for this delay and inconvenience.