Tuesday, May 6, 2014

How to Convert Word to PDF for Free in C#

This is an all-in-one solution to convert Word to PDF. Within this solution, you can either create a word from scratch or load a word template from folder, and then edit the document as you like; finally you can effortlessly convert word to PDF in C#, VB.NET. The conversion can be doc or docxto PDF.
Free Spire.Doc for .NET is a Community Edition of the Spire.Doc for .NET. It is a free.NET word library which enables users to directly manage word editing without Microsoft Word being installed, after the editing, you can convert the document to PDF in 2 steps.

Below is an effective screenshot of the document which will be converted to PDF. At the end of this post, you can find the target PDFdocument.
Now download the free version of Spire.Doc for .NET and convert word to PDF for personal use or evaluation. The whole process of converting word to PDF in C#, VB.NET can be described as 2 simple steps.
1. Declare a document and load document which you prepare by using ocument.LoadFromFile() method. The parameter passed to this method is file name string.
2. Save Word document as PDF by using document.SaveToFile() method. Parameters passed to this method is file name string and file format. The file format must be PDF.
using System;
using Spire.Doc;

staticvoid Main(string[] args)

Documentdocument = newDocument();

//Convert Word to PDF 
document.SaveToFile("toPDF.PDF", FileFormat.PDF);

//Launch Document 
mports System

Imports Spire.Doc 


SharedSubMain(ByValargs() AsString)

'Load Document 
Dim document AsNewDocument()

'Convert Word to PDF 
document.SaveToFile("toPDF.PDF", FileFormat.PDF)

'Launch Document 




After running the demo, you may find a PDF document launched on your computer:


  1. Why don't you give this JPG to PDF converter a try. You must try this JPG to PDF converter and you will be surprised

  2. How to Convert Word to PDF in C#, another .net document converter library, supports convert word to pdf/html/text, convert pdf to image/text and so on.

  3. The Free Spire.Doc for .NET product provided by the blogger is great, but I don't know if it can be reversed, support convert pdf to text c#, and support C# pdf to image.

  4. This comment has been removed by the author.

  5. Awesome article…..truly appreciated thanks keep sharing convert word to html

  6. merely a smiling visitant right here to allocation the excessive regard (:, btw top notch fashion. convert to word

  7. free html to pdf converter

    HTML to PDF Converter | Convert from html to pdf online, using SelectPdf web to pdf convert


  8. A much-needed list! There are often a lot of documents I need to convert due to the nature of my work and often the servers don’t respond or crash after a few processes. Now I can engage a few of these together to get my work done on time. As for the PDF to doc conversion I used ByteScout

  9. Nice blog.This Batch Word to RTF converter is an indispensable tool for those who have to convert .DOC format file to .RTF format files in bulk on day to day basis. word to rtf converter

  10. To convert a Word document to PDF for free in C, you can utilize libraries like iTextSharp or Microsoft's Office Interop. Does Streaming Improve iTextSharp enables programmatic PDF creation and manipulation.