Getting error message while converting from html to pdf

Hi,
I am trying to convert my html doc to PDF but i was facing some issue in conversion, also
I was logged with an error message like “Value cannot be null.
Parameter name: path1”.
The code which used for conversion is below :
private static byte[] HtmlToPdfVersion2(byte[] content)
{
using (var inputSteam = new MemoryStream(content))
using (var outputStream = new MemoryStream())
{
var htmlLoadOptions = new Pdf::HtmlLoadOptions();
htmlLoadOptions.PageInfo.Width = 1250;
htmlLoadOptions.PageInfo.Margin = new Pdf::MarginInfo(left: 5, bottom: 5, right: 5, top: 5);

			var document = new Pdf::Document(inputSteam, htmlLoadOptions);
			document.Save(outputStream, Pdf.SaveFormat.Pdf);

			return outputStream.ToArray();
		}
	}

I really don’t know what’s the reason behind this, so can you please help me with the need.Test.zip (27.5 KB)

@AravindhA

Would you please share your sample source HTML file with us. We will test the scenario in our environment and address it accordingly.

Hi,
Please do have a look into that attachment.

@AravindhA

We have checked the file that you have shared. The extension of the file was not .html but .ket. Would you kindly share if this is valid HTML file.

First we need to convert .ket to .html. From there we will convert that .html to PDF.
I will attach the conversion code as well

Hi
Added the valid html for your referenceTestHtml.zip (26.9 KB)

@AravindhA

We have tested the scenario in our environment while using Aspose.PDF for .NET 19.10 and were unable to notice the issue that you have mentioned. For your kind reference, an output PDF is also attached.OUTPUT.pdf (132.8 KB)

Would you please use latest version in your environment and in case you still face issue, please share a sample project in ZIP format which is able to replicate the issue. We will further proceed to assist you accordingly.

Hi,
Currently we are using version 11.3.
Can you please check the same issue in the lower version mentioned. I guess issue will get recreated.
Thanks

@AravindhA

We are afraid that you are using quite older version of the API whereas, it is recommended to use latest version always as it contains more fixes and improvements. Furthermore, support is provided on the basis of latest version of the API. We request you to please upgrade to latest version and in case you face any issue, please feel free to let us know. We will be more than happy to assist you accordingly.