convert docx to pdf in c#

MS word 2007 along with (Key Interoperability setting up are going to be put in through nonpayment). plugin SaveAsPDFandXPS (free from MS Site).

I have multiple word files (much more than 1500), and I wish to convert all of them to PDF programmatically. I utilize the subsequent functionality.

Microsoft.Office.Interop.Word.Application appWord = new Microsoft.Office.Interop.Word.Application();
    File.SetAttributes(filename, FileAttributes.Temporary);
    wordDocument = appWord.Documents.Open(filename);
    wordDocument.ExportAsFixedFormat(filename.ToString() + ".pdf", WdExportFormat.wdExportFormatPDF);

Be sure you have endorsement to Word.12. It is going to automatically add Microsoft.Office.interop.word to your recommendation. Adhere to these for various other office use.

The code must be actually in C# or, Suitable with VS 2005. (If certainly not, after that likewise feel free to publish your replies, i would certainly at that point manually convert to VS 2005).

i discovered tons of service making use of office dll. However i desire a service utilizing free of cost third party dll due to the fact that in office dll there have to be actually office set up. On my web server there is actually ‘n office installed.

You’ll need to transform your technique phone call to Available to pass along a read-only flag.
Find out more over at Microsoft. You perhaps wish to simply open one circumstances of Word– as well as explicitly close each data when you’re done– considering that along with the variety of reports you are actually processing, you’ll lose RAM promptly.

How can i convert .docx to .pdf utilizing c# I can easily certainly not utilize any 3rd party element.

I wish to convert word file to pdf.

Exists any type of free 3rd party dll???

resembles you do have to have actually office installed. One of the remarks in the second link discusses utilizing OpenXmlPowerTools.HtmlConvertor and also iTextSharp to convert the documentation in to HTML, and after that visiting a PDF.

Hope this aids. I am actually certainly not familiar with any free of cost solutions that are going to team up with more mature variations of Word (. docx).

i believe making use of itextsharp is actually lengthy way to work because convert word to html and after that to pdf. no various other technique to do straight word to pdf?

A video clip concerning the OpenXML Viewer Customer which permits you watch a.docx in a web browser. Viewer audience could be located listed here.

If you are actually using .docx files, take a look at DocX:
Take an appeal at this blog site message for an instance on using DocX to convert to PDF: Converting .docx into pdf, html.

I submitted many articles on transforming OpenXML documentations to HTML. Sadly it appears like a great deal of work.