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

how to export the DocIo document to pdf

Thread ID:





67636 Aug 25,2007 09:17 PM UTC Sep 15,2010 02:38 PM UTC ASP.NET Web Forms (Classic) 6
Tags: DocIO
Asked On August 25, 2007 09:17 PM UTC

I am evaluating the backoffice suite and i succeed to create the word document

Still i can not find how to convert it to pdf. I searched FAQ and forums, found several topics mentioning it but never found a code sample

Could you post me one, please ?


Replied On September 2, 2007 05:48 PM UTC

anyone from support can help me ?

Melba Winshia [Syncfusion]
Replied On September 5, 2007 12:18 PM UTC

Hi Dimitri,

Thank you for your interest in Syncfusion products.

Currently we do not provide support for Doc to PDF. Sorry for the inconvenience caused.

Please let me know if you have any other questions.


Mike van Oorschot
Replied On July 25, 2008 07:25 AM UTC


I understand Doc to PDF was possible in older versions of the DocIO and PDF libraries but was not supported. Since the recent re-working of the PDF library there doesn't seem to be any way to do this.

Please can you confirm if Doc to PDF is possible at all. If not, are there any plans to support this conversion and if so, when?

Thanks in advance,


>Hi Dimitri,

Thank you for your interest in Syncfusion products.

Currently we do not provide support for Doc to PDF. Sorry for the inconvenience caused.

Please let me know if you have any other questions.


Bhuvaneswari P [Syncfusion]
Replied On July 25, 2008 01:12 PM UTC

Hi Mike,

To convert a word-document into a pdf

We don't have direct option to convert from Doc to PDF. But we have implemented support for doc to HTML in our latest release Volume 3. Through this we can workaround for Doc to PDF. Already we have support for HTML to PDF. So doc to PDF can be achieved by converting the specific doc to HTML and then convert HTML to PDF.

Code snippet for doc to HTML

WordDocument doc1 = new WordDocument(Filename);
HTMLExport htmlExport = new HTMLExport();
//Export the doc to HTML and save as .html file
doc1.SaveOptions.HtmlExportImagesFolder = Application.StartupPath;
htmlExport.SaveAsXhtml(doc1, "sample.html");

Code snippet for HTML to PDF

using (Image img = html.ConvertToImage(strHtml, ImageType.Metafile, (int)width, -1, dimension))
PdfMetafile metafile = (PdfMetafile)PdfImage.FromImage(img);
PdfMetafileLayoutFormat format = new PdfMetafileLayoutFormat();
format.Break = PdfLayoutBreakType.FitElement;
format.Layout = PdfLayoutType.Paginate;
pdf.PageSettings.Height = img.Height;
format.SplitTextLines = false;
metafile.Draw(page, new RectangleF(0, 0, pageSize.Width, -1), format);

Here is the sample for your reference:


Please add the below assemblies before run the sample:
1. AxSHDocVw.dll
2. SHDocVw.dll
3. Syncfusion.DocIO.Base.dll
4. Syncfusion.Core.dll
5. Syncfusion.Compression.Base.dll
6. syncfusion.htmlconverter.base.dll
7. syncfusion.pdf.base.dll

Note: we do have only limited support for doc to HTML. Not all the elements are converted to HTML page.

Please download the latest version from the below link:


Please let me know if you have any questions.

Best Regards,

Phuoc Nguyen
Replied On March 31, 2010 07:09 AM UTC

Hi Bhuvana,

Word to Pdf conversion available to SilverLight? If so what library do I need to reference?



Replied On September 15, 2010 02:38 PM UTC


Try the code below. It works foe me.

Hope it helps!

using Syncfusion.DocToPDFConverter;

private void DocToPDF()
string path = @"C:\DocFile.doc";
string outPdfPath = @"C:\out.pdf";
WordDocument document = new WordDocument();
document.Open(path, FormatType.Doc);

DocToPDFConverter converter = new DocToPDFConverter();
PdfDocument pdfDoc = converter.ConvertToPDF(document);

catch (Exception ex)




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