C#: Online Guide
How To: Word SDK
Convert Word to PDF
Convert Word to PDF
Home ›› XDoc.Word ›› C# Word: Convert Word to PDF

C# Word - Convert Word to PDF in C#.NET

Online C# Tutorial for Converting Word to PDF (.pdf) Document

Word to PDF Conversion Overview

RasterEdge Visual C# .NET Word to PDF converter library control (XDoc.Word) is a mature and effective Word document converting utility. Using this Word to PDF converting library control, .NET developers can quickly convert Word document to PDF file using Visual C# code. This C#.NET Word to PDF conversion library can help developers convert multi-page Word document to multi-page PDF file.

The most outstanding feature of this Word to PDF converting toolkit is its industry-leading converting accuracy. The PDF file, converted by RasterEdge Word to PDF converter toolkit, preserves the structure & layout of target Word document, keeps the elements (like images, tables and chats) of original Word file and maintains the original text style (including font, size, color, links and boldness).

Why do we need this Word to PDF converting library? In the daily-life applications, you often need to render and print Word document content for certain purpose. But without licensed third-party software, you can hardly print the word document as the original style. Under this situation, you need to convert Word document to some image format document.

RasterEdge XDoc.Word empowers your C#.NET application with advanced Word to PDF conversion functionality.

C# Demo: Convert Word to PDF Document

This is a C# programming example for converting Word to PDF (.pdf) file.

// Used to register all DLL assemblies.

// Load a Word document.
String inputFilePath = Program.RootPath + "\\" + "1.docx";
DOCXDocument doc = new DOCXDocument(inputFilePath);

// Convert and output to a PDF file.
String outputFilePath = inputFilePath + ".pdf";
doc.ConvertToDocument(DocumentType.PDF, outputFilePath);