How to convert PDF document to HTML (stream to stream)

@vyacheslav.deryushev @asad.ali can you please give an example for converting pdf to html and saving using ByteArrayOutputStream.

I am using thie piece of code and which is not working.

try (ByteArrayInputStream byteStream = new ByteArrayInputStream(pdfBytes)) {
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(byteStream);
try (ByteArrayOutputStream dstStream = new ByteArrayOutputStream()) {
com.aspose.pdf.HtmlSaveOptions saveOptions = new com.aspose.pdf.HtmlSaveOptions();
saveOptions.setDocumentType(HtmlDocumentType.Html5);
pdfDocument.save( dstStream, saveOptions);
}
}

getting an error given below
Inconsistent saving options detected: ‘CustomStrategyOfCssUrlCreation’, ‘CustomCssSavingStrategy’, ‘CustomResourceSavingStrategy’ may not be null when requested saving to stream without embedding CSS and resources!

@athulcp3 I moved your question to Aspose.PDF. My colleagues will help you.

FYI @asad.ali

A post was split to a new topic: Wrong alignments Html to Pdf/Docx