We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem to convert DOCX to PDF

Thread ID:





110380 Jul 31,2013 05:52 PM UTC Aug 19,2013 06:55 AM UTC WinForms 4
Tags: DocIO
Javier Briseño Perez-Verdia
Asked On July 31, 2013 05:52 PM UTC


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())
     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)



Javier Briseño Perez-Verdia
Replied On July 31, 2013 06:49 PM UTC


Excuse the problem I'm having is in ASP.NET.


Prasanth M B [Syncfusion]
Replied On August 1, 2013 12:40 PM UTC

Hi Javier,

Thank you for using Syncfusion products.

Currently DocIO does not support Doc to PDF conversion by using DocIO in Partial trust mode. For performing Doc to PDF conversion, it is mandatory to use DocIO in Full trust mode. Please refer the below UG documentation link for details on Partial and full trust modes.

Partial and full trust mode:

For details on Doc to PDF conversion, please refer the below UG documentation link.

Doc to PDF conversion:

We have prepared a Doc to PDF conversion sample. Please find the sample from the attachment.

Please let us know if you have any questions.



Javier Briseño Perez-Verdia
Replied On August 2, 2013 06:45 PM UTC

Hi Prasanth.

Thanks for the quick reply.
I managed to solve the problem really was using the reference partial moved to Full worked.


Sivasubramani V [Syncfusion]
Replied On August 19, 2013 06:55 AM UTC

Hi Javier,

Thank you for your update.

Please let us know if you have any questions.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon