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. Image for the cookie policy date

DocToPdfConverter reference error

Hi there,
Please assist as this is driving me crazy.
I am trying to convert a word document to PDF in an ASP.NET MVC application
Below is the code:
The using statements:
usingSyncfusion.DocIO;
usingSyncfusion.DocIO.DLS;
usingSyncfusion.DocToPDFConverter;
usingSyncfusion.Pdf;


Code:

WordDocumentdocument=newWordDocument(path,Syncfusion.DocIO.FormatType.Doc);
DocToPDFConverterconverter=newDocToPDFConverter();
PdfDocumentpdfDoc=converter.ConvertToPDF(document);
My problem is when compiling it gives me errors:

Error	24	The type or namespace name 'DocIO' does not exist in the namespace 'Syncfusion' (are you missing an assembly reference?)
Error	25	The type or namespace name 'DocToPDFConverter' does not exist in the namespace 'Syncfusion' (are you missing an assembly reference?)
Error	26	The type or namespace name 'Pdf' does not exist in the namespace 'Syncfusion' (are you missing an assembly reference?)

I have added references according to article: 
https://help.syncfusion.com/file-formats/pdf/working-with-document-conversions#converting-word-documents-to-pdf

But it does not work according to the site.

If I add references to:

DocIO.MVC, DocIO.Helper.MVC, Pdf.Helper.MVC and Pdf.MVC then I get rid of the errors except:

Error	25	The type or namespace name 'DocToPDFConverter' does not exist in the namespace 'Syncfusion' (are you missing an assembly reference?)
This is driving me me crazy as I have been struggling for 2 days.

I am using Visual Studio 2013 with Syncfusion 13.4.0.63. My project is .NET 4.5.1

What is going on?

Neill



1 Reply

SY Sethumanikkam Yogendran Syncfusion Team October 13, 2016 06:55 AM UTC

Hi Customer,

Thank you for contacting Syncfusion support.

We are unable to reproduce the mentioned issue with given details. We suspect your sample may have assemblies referred with higher framework assemblies. Please use proper framework assemblies in your project, and try to resolve the issue.

Note: If you’re using .NET 4.5.1, then you can refer assemblies from .NET 3.5 to .NET 4.5.1.

For converting a Word document to PDF, the following assemblies need to be referenced in your application

1. Syncfusion.DocIO.Base
2. Syncfusion.Compression.Base
3. Syncfusion.OfficeChart.Base
4. Syncfusion.Pdf.Base
5. Syncfusion.DocToPdfConverter.Base

Please refer the below link to know more about Assemblies Required for Word to PDF conversion.
https://help.syncfusion.com/file-formats/docio/assemblies-required#converting-word-document-to-pdf

If you’re still facing the issue means, kindly provide us your sample or modify the below Word to PDF sample to reproduce the issue at our end.
http://www.syncfusion.com/downloads/support/forum/126379/ze/WordToPDF_DocIOSample442010282.zip

Kindly let us know if you have any other questions.

Thanks
Sethumanikkam.Y


Loader.
Up arrow icon