When trying to generate PDF from HTML file, below error is thrown.The stack trace is also lengthy and it is mostly garbled characters, but it at the end it looks like the error id from the Constructor.
Can you please help resolve this, below is the code snippet where error is thrown from
Blockquote
HtmlLoadOptions options = new HtmlLoadOptions();
options.HtmlMediaType = HtmlMediaType.Print;
Document pdfDocument = new Document(sDestinationPDFPath + “HtmlPage.html”, options);
Message: Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index\n\n\nStack Trace: at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)\r\n at #=zKqynjq4cWYvgKoI_g9WJmCHwBVkjXdD1eCk1Nm0=.#=z4rv$SbiBB3VS.get_Item(Int32 #=z8uXFBBQ=)\r\n at
…
…’
…
#=zswH$aVR6HIrP, Document #=z1P91RMrDGtKM, HtmlLoadOptions #=z67c0XNBOeacb)\r\n at Aspose.Pdf.Document.#=zLBoAUMU=(Stream #=z80UDQl4=, LoadOptions #=ztItDrhg=)\r\n at Aspose.Pdf.Document…ctor(String filename, LoadOptions options)\r\n at MoveFiles.PrintMultiple.GenerateConsolidatedDocument() in