Code:
// create new instance of HtmlConversionOptions.
HtmlConversionOptions conversionOptions = new HtmlConversionOptions(PageSize.A4, PageOrientation.Portrait, 36);
// Create new instance of Converter by providing suitable parameters.
HtmlConverter htmlConversion = new HtmlConverter(@populatedHtml, conversionOptions);
//Call Convert method to start conversion
htmlConversion.Convert(@FileName);
returns error:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at zz93.u.a[a](Task`1& A_0, ConversionOptions A_1)
at ceTe.DynamicPDF.Conversion.HtmlConverter.Convert(String outputFilePath)
This is basically taking an in memory HTML strin andconverting to PDF. It appears to work on one of my apps, but this error pops up on another app I built recently. Any ideas what this error report means?
Converting HTML to PDF - Odd error
Re: Converting HTML to PDF - Odd error
Support · Apr 27, 2022Hello,
If you are looking for only HTML to PDF conversions, then please try using the DynamicPDF HTML Converter product and see it works for you.
You can download DynamicPDF HTML Converter from NuGet (Package ID: ceTe.DynamicPDF.HtmlConverter.NET) or from our website here
.
If you continue having an issue, please send over the following information to [^a|mailto:support@dynamicpdf.com|opennewwindow|support@dynamicpdf.com^] so we can look into it further.
1. Simple application which uses static data to recreate the error.
2. Steps need to be followed to recreate the error.
3. Full error message along with stack trace.
4. Environment on which the application is running.
5. Exact version and build of DynamicPDF DLL file used in your application. You can find this information by right clicking on the DLL file>>Properties>>Details tab>>Product version, Take a screenshot of Details tab and send it over to us.
Thanks,
ceTe Software Support Team