Convert DOCX to PDF in C# using PDF Metamorphosis .Net
Key Features
Text to PDF
Split and merge PDF
Download trial
Code examples
Video Tutorials
Version History

Convert DOCX to PDF in C# using PDF Metamorphosis .Net

Convert DOCX to PDF in C# using PDF Metamorphosis .Net


     Let's see how to add "DOCX to PDF feature" into any .NET application. First of all, to give your .NET application ability to convert DOCX documents to PDF, add a reference to the "PdfMetamorphosis.dll" assembly. You may download it here 32.7 Mb.

            SautinSoft.PdfMetamorphosis p = new SautinSoft.PdfMetamorphosis();

            string docxPath = @"c:\The Master and Margarita.docx";
            string pdfPath = @"c:\The Master and Margarita.pdf";

            p.DocxToPdfConvertFile(docxPath, pdfPath);
The docx to pdf conversion method is available starting from .NET 4.0 and higher. We recommend you to use the PdfMetamorphosis.dll compiled for the latest .NET. During conversion to PDF you may adjust following:
  • Set page size, orientation and margins.
  • Set a single font face, size and color for your PDF document.
  • Add custom headers and footers.
  • Add page numbering.
  • Add custom watermarks to your PDF.
  • Specify the version of produced PDF.
  • Embed all fonts inside PDF.

Nuget  Online Demo   Download, (Feb 25-th, 2020)

Have a Question?

You have a question, need a support or a code example: ask our support team at We will help you quickly and with pleasure.

What PDF Metamorphosis .Net can give me:

  1. Save a time and cost of developing of my application. You will need to only add the reference to "PdfMetamorphosis.dll" and write 3-4 C# lines to get ability create PDF from HTML, RTF, Text or PDF from DOCX.

  2. The one product provides me by set of API to convert from Text, RTF, HTML to PDF at once, split and merge PDF documents.

  3. Because of this is absolutely standalone PDF library, I don't need to worry about the availability of Adobe Acrobat, MS Word, OpenOffice or other software on the my client's computers.

  4. My software will have the one of the fastest API to convert into PDF documents and therefore my clients will not have any delays during creating PDF documents.

  5. I don't need to worry about accuracy of source HTML and RTF documents. PDF Metamorphosis .Net can "eat" any types, versions and produce for me a valid PDF document.

  6. The one time price. I pay a one time and can use «PDF Metamorphosis .Net» for a whole life without any additional fees. My license will never expires.

  7. As bonus, I get unlimited technical support during a whole life for free and independently of the date of my purchasing.

Input DOCX documents

The component has own DOCX parser. If you are looking only for C# DOCX class which can parse and render DOCX documents, see Document .Net.

Some examples to convert DOCX to PDF in C# and VB.Net

1. Convert DOCX file to PDF file in C#:

            SautinSoft.PdfMetamorphosis p = new SautinSoft.PdfMetamorphosis();
            if (p != null)
                string docxPath = @"d:\Notes from Underground.docx";
                string pdfPath = Path.ChangeExtension(docxPath, ".pdf");

                int result = p.DocxToPdfConvertFile(docxPath, pdfPath);

                if (result==0)

2. Convert DOCX to PDF in memory using VB.Net:
            Dim p As New SautinSoft.PdfMetamorphosis()

            If p IsNot Nothing Then
                Dim docxPath As String = "d:\Lolita.docx"
                Dim pdfPath As String = Path.ChangeExtension(docxPath, ".pdf")
                Dim docxBytes() As Byte = File.ReadAllBytes(docxPath)

                Dim pdfBytes() As Byte = p.DocxToPdfConvertByte(docxBytes)

                If pdfBytes IsNot Nothing Then
                    File.WriteAllBytes(pdfPath, pdfBytes)
                    System.Console.WriteLine("An error occurred during converting DOCX to PDF!")
                End If
            End If
If anyone needs a code sample in C#, VB.Net, ASP.Net etc "How to convert DOCX to PDF", email us at or ask at Online Chat (right-bottom corner of this page). We'll help you certainly!

Requirements and Technical Information

     Requires only .NET Framework 4.0 or higher. Our product is compatible with all .NET languages and supports all Operating Systems where .NET Framework and .NET Core can be used. Note that PDF Metamorphosis .Net is entirely written in managed C#, which makes it absolutely standalone and an independent library.

.Net Framework 4.0 and higher and .Net Core 2.0 and higher

.NET Framework 4.0, 4.5, 4.6.1 and higher.

.NET Standard 2.0

.NET Core 2.0 and higher.

Multi-platform component, runs on:

Our component has proven itself on cloud platforms and services:

  • Microsoft Azure
  • Amazon Web Services (AWS)
  • Google Cloud Platform
  • SharePoint
  • Docker
  • etc.

Reasonable prices

     The library offers developers high quality conversion at reasonable prices. The main point of interest is that PDF Metamorphosis .Net is less expensive than all of its more or less popular counterparts. For example, a single license cost $439(US) with no additional fees or royalties!


To see this functionality firsthand, download the freshest «PDF Metamorphosis .Net» with code examples, 32.7 Mb.


  • Sweden, Stockholm
  • Mortviksvagen 68B 142 43 SKOGAS
  • Tel: +46 812111486
  • Email:
    Copyright © 2002 - 2020 SautinSoft (started from All rights reserved.