I have recently been working on a project in which I must provide the ability to convert a Word Document to a PDF. I searched a lot and found Spire.Doc (a product of the e-iceblue company that provides .NET, Silverlight and WPF development components).
Spire.Doc for .NET is a professional Word. NET library specially designed for developers to create, read, write, convert and print Word document files from any .NET (C#, VB.NET, ASP.NET) platform with fast and high-quality performance.
You can also download a free edition of Spire.Doc. Free Spire.Doc for .NET is a Community Edition of the Spire.Doc for .NET, that is a totally free word component for commercial and personal use with some limitations.
I have downloaded Spire.Office that includes Spire.Doc as well as other components (Spire XLS, Spire.Presentation, Spire.PDF, Spire.DataExport, Spire.PDFViewer, Spire.DocViewer and Spire.BarCode). You can also download Spire.Office or Spire.Doc depending on your needs.
After downloading, install the Spire.Office or Spire.Doc (whatever you have downloaded).

Let's Begin
Create a new Windows Form Application. I selected .NET Framework 4
Right-click on References in Solution Explorer and click Add Reference...
In Reference Manager, Click the Browse tab.

Now go to C:\Program Files (x86)\e-iceblue\Spire.Office\Bin\NET4.0 and Add Spire.Doc.dll to your project.
After adding you will see a Spire.Doc DLL reference added to your project.
Now, drop a button (named btnConvert) control on the form and double-click on it to create its Click event.
Add the Spire.Doc and Spire.Doc.Documents namespaces in the .cs code.
Add the following lines of code for the button Click event:
- private void btnConvert_Click(object sender, EventArgs e)
- {
- //Load Document
- Document doc = new Document();
- //Pass path of Word Document in LoadFromFile method
- doc.LoadFromFile(@"C:\Users\Anoop Kumar Sharma\Desktop\Coding.Docx");
- //Pass Document Name and FileFormat of Document as Parameter in SaveToFile Method
- doc.SaveToFile("Convert.PDF",FileFormat.PDF);
- //Launch Document
- System.Diagnostics.Process.Start("Convert.PDF");
- }
I hope you liked this article. Thanks.

Ivana BPosted Jan 6, 2020, 10:08 AM
Hi,I just tried simple Document docPDF = new Document(); docPDF.LoadFromFile(fullFileName+".docx", Spire.Doc.FileFormat.Docx); docPDF.SaveToFile(fullFileName+".pdf", Spire.Doc.FileFormat.PDF); and ll headers and footers from word document are not saved to PDF. Could you please explain how can I achieve this? Thanks.
Nemo NFPosted Sep 25, 2019, 7:37 PM
Hi Anoop, tried to follow your code and able to convert the Word document to PDF, however, the pdf generated contains a line of sentence mention 'Evaluation Warning: The document was created with Spire.PDF for .NET'. Is there any ways that I can remove this sentence when converting to PDF ? Thanks
Vikas SinghPosted Jul 26, 2019, 2:43 AM
Hi Anoop, It's working fine however there are few content with font OCR A Std are not captured completely into pdf.. can you pls. suggest if we can just image the all content into pdf from word to pdf.
annu patelPosted May 1, 2019, 5:07 AM
I have error using the code in visual studio
Clark DollardPosted Sep 4, 2017, 7:26 PM
WARNING: Anything in the Word doc that was written with the equation editor will not be converted. Maybe not an issue for most people but I'm writing an app for math teachers. I just lost a months worth of work because I didn't catch this sooner.
Sanket PatelPosted Dec 16, 2016, 4:07 AM
Can not open the storage..error shows..how to solve it?
David DouglasPosted Sep 9, 2015, 10:52 AM
Thanks, but am I missing something? Their website says its totally free, with a limitation of 3 pages or 100 paragraphs. But the PDF files created all contain an evaluation warning, which changes the layout of the document. Is Free Spire.Doc only an evaluation copy?
Anoop Kumar SharmaPosted Aug 31, 2015, 1:38 AM
Thanks Hashim Shafiq..!!
Hashim ShafiqPosted Aug 30, 2015, 9:49 PM
nice
Anoop Kumar SharmaPosted Aug 30, 2015, 2:37 AM
Thanks Santhakumar Munuswamy Sir..!!
Santhakumar MunuswamyPosted Aug 29, 2015, 4:36 AM
Good article. Thanks for sharing
Joris DecraeckerPosted Aug 28, 2015, 8:48 AM
The downside of this way of converting is that the server requires an installation of Word. It basically opens an instance of Word and saves it as a PDF file. Some servers don't have a Word installation but rather use Word Online. Then this won't work unfortunately.
Anoop Kumar SharmaPosted Aug 28, 2015, 7:18 AM
Thanks Karthikeyan K Sir..!!
Karthikeyan KPosted Aug 28, 2015, 6:22 AM
Good one sir...Thanks for share