Examples

Convert Word to PDF (.NET Framework)

How to Convert Word to PDF

Converting a Word(docx or doc) file to PDF can be done by calling the static Convert method of the Converter class. If required to use advanced options then WordConverter class can be used with WordConversionOptions. Below are the steps and sample code to do so.

Steps to convert DOCX/DOC to PDF

  1. Create a WordConversionOptions object to set the options.
  2. Create a WordConverter object by specifying the Word file and the options.
  3. Invoke the Convert method on the WordConverter and specify the PDF file name.

Sample Code - C#

WordConversionOptions options = new WordConversionOptions(false);

WordConverter wordDocConverter = new WordConverter("DocumentA.doc", options);

wordDocConverter.Convert("OfficeDocFileConversion.pdf");

Sample Code - C# using Convert()

Converter.Convert("DocumentA.docx", "MyOutput.pdf")

Getting Started

DynamicPDF Converter Information

More information can be found here:

Try the free evaluation.

Why Choose DynamicPDF?

  • Transparent Pricing
  • Lots of Features
  • Easy to Use
  • Great Support
  • Efficient Performance
  • Product Maturity (Over 18 Years)
  • Free Evaluation
  • .NET Core Support (Most Products)
  • Flexible Licensing

We’re Not The Only Ones That Think We’re Great!