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

Free Support Forum - aspose.com

PDF byte array to stream to HTML | PDF to HTML using C# Aspose.PDF for .NET

Hi,

I am trying to convert a PDF byte array to HTML, but intermittently document.save(FileName, Aspose.Pdf.SaveFormat.Html) is failing with the “Parameter is not valid” exception.
I am using Aspose.Pdf version 17.8.0.0 .

using (var stream = new MemoryStream(pdfByteArray))
{
using (var document = new Aspose.Pdf.Document(stream))
{
document.Save(fileName, Aspose.Pdf.SaveFormat.Html);
}
}

@sujitjadhav

Could you please try your scenario with Aspose.PDF for .NET 21.2 and let us know in case issue still persists by sharing your sample HTML file with us. We will test the scenario in our environment and address it accordingly.