Hi
I am currently evaluating product and so far so good, however..
I am trying to convert HTML to PDF.
I am unable to use the Thread as its saying "The type or namespace name 'Thread' could not be found.
I am using
using Spire.Pdf;
using Spire.Pdf.HtmlToPdf;
using Spire.Pdf.HtmlConverter;
using Spire.Pdf.Functions;
using Spire.Pdf.Graphics;
if(bd.Extension.ToLower() == ".html")
{
PdfDocument doc = new PdfDocument();
String url = bd.FullName;
Thread thread = new Thread(() =>
{ doc.LoadFromHTML(url, false, true, true); });
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
thread.Join();
//Save pdf file.
doc.SaveToFile("sample.pdf");
doc.Close();
//Launching the Pdf file.
System.Diagnostics.Process.Start("sample.pdf");
}
Can you help?
Thanks