Word to PDF for .NET.
DOCX, DOC and RTF, on every platform.
Convert Word documents to PDF in C# and VB.NET with SelectPdf.Universal, our new flagship library (commercial edition), on Windows, Linux and macOS on Apple Silicon. The Word engine is part of the library, so there is no browser to start, no network access and no native package to deploy. Page sizes follow the document, headings become bookmarks, and the output can be tagged PDF/UA or archival PDF/A.
Add Word to PDF to your project
One package — no Office to install, no browser to start.
Convert Word to PDF in C# and VB.NET.
ConvertStream and ConvertBytes take the same document from memory; the format comes from the file extension or is detected from the bytes.
using SelectPdf.Universal;
WordToPdf converter = new WordToPdf();
PdfDocument doc = converter.ConvertFile("contract.docx");
doc.Save("contract.pdf");
doc.Close();
Imports SelectPdf.Universal
Dim converter As New WordToPdf()
Dim doc As PdfDocument = converter.ConvertFile("contract.docx")
doc.Save("contract.pdf")
doc.Close()
Convert DOCX, DOC and RTF to PDF — and eight more formats.
Let the library detect the format, or name it yourself with WordFormat.
The document's pages, or yours.
Document — the default
Each PDF page takes the size of its Word page, mixed sizes and orientations included. Your margins and header or footer bands are taken off the page, so the document's content never runs into them.
Options
Set PageSetup to Options and
the document reflows onto your page size, orientation and margins instead.
Accessible and archival PDF from Word.
Set AccessibilityStandard, Title and
Language, as on the HTML converter.
Word in headers, footers and page regions.
PdfWordSection
Puts a Word document in a header or footer band — a letterhead kept as a .docx — and works under an HTML conversion too.
PdfWordElement
Draws a Word document into a region of a page and, with Height = -1,
continues it onto the pages that follow.
Word to PDF options — passwords, bookmarks, fonts.
Word to PDF is in the commercial SelectPdf.Universal package. It is not in the free
Community Edition, and the classic Windows library does not include it — classic converts RTF only, as a
page element (RtfToPdfElement).
Word to PDF in .NET, answered.
More in the cross-platform PDF library overview — the rest is one email away.