I am trying to convert a HTML document to PDF using Aspose PDF 8.7.0.0.
I am using the .NET 4.0 version of the latest version of your controls.
The code snippet is below and it produces and empty PDF document.
The attached HTML file opens in the browser but does have invalid URL’s in it for some of its resources.
Thanks in adavnce
var pdfLicense = new Aspose.Pdf.License();<span style="color:blue;">var</span> license = <span style="color:blue;">new</span> <span style="color:#2b91af;">License</span>(); license.SetLicense(<span style="color:#a31515;">"Aspose.Total.lic"</span>); <span style="color:green;">// Instantiate license file</span> pdfLicense.SetLicense(<span style="color:#a31515;">"Aspose.Total.lic"</span>); <span style="color:green;">// Set the value to indicate that license will be embedded in the application</span> pdfLicense.Embedded = <span style="color:blue;">true</span>; <span style="color:blue;">var</span> htmlText = <span style="color:#2b91af;">File</span>.ReadAllText(parameters.SourcePath); Aspose.Pdf.Generator.<span style="color:#2b91af;">Pdf</span> pdf = <span style="color:blue;">new</span> Aspose.Pdf.Generator.<span style="color:#2b91af;">Pdf</span>(); pdf.HtmlInfo.CharsetApplyingLevelOfForce = <span style="color:#2b91af;">HtmlInfo</span>.<span style="color:#2b91af;">CharsetApplyingForceLevel</span>.EnforceUseAlways; pdf.HtmlInfo.CharSet = <span style="color:#a31515;">"UTF-8"</span>; pdf.HtmlInfo.BadHtmlHandlingStrategy = <span style="color:#2b91af;">BadHtmlHandlingStrategy</span>.TreatAsPlainText; pdf.HtmlInfo.TryEnlargePredefinedTableColumnWidthsToAvoidWordBreaking = <span style="color:blue;">true</span>; pdf.HtmlInfo.ShowUnknownHtmlTagsAsText = <span style="color:blue;">true</span>; pdf.HtmlInfo.ShrinkLongImagesToPageHeight = <span style="color:blue;">true</span>; pdf.HtmlInfo.UseNewHtmlConvertorForEachHtmlTextBlock = <span style="color:blue;">true</span>; pdf.BindHTML(htmlText);</pre></div>