Hi,
Thank you, I downloaded and added the following assemblies:
Syncfusion.Compression.Portable
Syncfusion.HtmlConverter.Portable
Syncfusion.Pdf.Portable
but after running the code below,
public MemoryStream CreateDocument(string pathURL)
{
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
//Initialize the WebKit settings
WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
//Set the webKit path
webKitSettings.WebKitPath = "../QtBinaries/";
//Set the WebKit conversion settings
htmlConverter.ConverterSettings = webKitSettings;
//Convert url to pdf
MainPage.stateSequencerController.GenerateHTML();
PdfDocument document = htmlConverter.Convert(pathURL);
//Save the document
MemoryStream stream = new MemoryStream();
document.Save(stream);
//Sets the stream position
stream.Position = 0;
//Close the PDF document
document.Close();
//Return the PDF stream.
return stream;
}
I get this exception:
Unhandled Exception:
System.TypeLoadException: Could not load type of field 'Syncfusion.HtmlConverter.WebKitConverterSettings:m_toc' (18) due to: Could not resolve type with token 01000011 (from typeref, class/assembly Syncfusion.Pdf.HtmlToPdf.HtmlToPdfToc, Syncfusion.Pdf.Portable, Version=16.4200.0.40, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89) assembly:Syncfusion.Pdf.Portable, Version=16.4200.0.40, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89 type:Syncfusion.Pdf.HtmlToPdf.HtmlToPdfToc member:(null) signature:<none> occurred
Can you please help me with this?
Thanks,
Reihaneh