Hello,
I'm having some problem when I'm trying to convert a Word template to PDF in Syncfusion Version 9.403.0.62. Can You help me with this problem.
The Error is Below.
The main problem is when Im trying to convert to PDF the Objet WordDocument.
(convertWord.ConvertToPDF(documentTemplate)) Was not recognizing the object type, and display the error below:
1 - The type 'Syncfusion.DocIO.DLS.WordDocument' is defined in an assembly that is not referenced. You must add a reference to assembly 'Syncfusion.DocIO.Base, Version=9.403.0.62, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89'.
2 - The best overloaded method match for 'Syncfusion.DocToPDFConverter.DocToPDFConverter.ConvertToPDF(Syncfusion.DocIO.DLS.WordDocument)' has some invalid arguments
3 - Argument 1: cannot convert from 'Syncfusion.DocIO.DLS.WordDocument [c:\Presto_Luiz\Presto Santander Brasil\trunk\Ver2_1.1\SolnPrestoSantanderBrasil\WebPrestoSerfin\Recursos\Syncfusion.DocIO.Web.dll]' to 'Syncfusion.DocIO.DLS.WordDocument'
The code than im using is below:
using Syncfusion.DocIO;using Syncfusion.DocIO.DLS;using Syncfusion.DocToPDFConverter;using Syncfusion.Pdf;using Syncfusion.Pdf.Parsing;var documentTemplate = new Syncfusion.DocIO.DLS.WordDocument();var filePath = Path.Combine(Server.MapPath(@"~/" + ConfigurationManager.AppSettings["temaplte"]),file); documentTemplate.Open(filePath, FormatType.Docx);// CODE.
.
.
.
var convertWord = new Conert.DocToPDFConverter();PdfDocument pdf = convertWord.ConvertToPDF(documentTemplate); using (var ms = new MemoryStream()) { pdf.Save(ms); Session[file] = ms.ToArray();When i put the mouse's cursor in the object:
Cannot resolve method ‘ConvertToPDF(Syncfusion.DocIO.DLS.WordDocument)’, candidates are:
Syncfusion.Pdf.PdfDocument ConvertToPDF(string) (in class DocToPDFConverter) Syncfusion.Pdf.PdfDocument ConvertToPDF(Syncfusion.DocIO.DLS.WordDocument) (in class DocToPDFConverter) Syncfusion.Pdf.PdfDocument ConvertToPDF(System.IO.stream) (in class DocToPDFConvert)
Thanks
CODE_Minuta_51da0aa3.zip