This repository contains examples that illustrates how to convert Word documents to PDFs with advanced options programmatically in C#. The Syncfusion® .NET Word library (DocIO) converts a Word document to PDF with just five lines of code and also it does not require Microsoft Word application to be installed in the machine. It preserves the original appearance of the Word document in the converted PDF.
-
Word to PDF conversions
- Convert Word to PDF - Convert Word document to PDF.
- Accessible PDF document - Convert Word document to PDF/UA (Section 508 compliant).
- PDF conformance level - Convert Word document to PDF/A with various PDF conformance levels for long-term archiving and standardization.
-
Embed fonts
- Embed font subset - Embed only the necessary font subsets to optimize file size.
- Embed complete font - Embed fonts within the PDF for consistent display.
-
Word to PDF advanced options
- Editable PDF form fields - Preserve Word document form fields as PDF forms, allowing the creation of editable PDFs.
- Word headings to PDF bookmarks - Convert Word headings to PDF bookmarks, generating PDF documents with bookmarks based on paragraph styles and outline levels.
- Optimize identical images - Optimize identical images to reduce PDF file size.
- Disable alternate chunks - Include or exclude alternate chunks during Word to PDF conversion.
- Complex script text - Convert complex script text accurately.
- Hyphenation in Word-to-PDF - Use custom dictionaries for text hyphenation in the converted PDF.
- Comments in Word-to-PDF - Toggle between preserving or excluding comments during Word to PDF conversions.
- Restrict permission in PDF - Restrict permissions in the converted PDF for added security.
-
Preserve track changes
- Track-changes-in-Word-to-PDF - Preserve revision marks of tracked changes in the converted PDF.
- Change track changes color - Customize the color of track changes marks during conversion.
- Show or hide revisions in balloons - Show or hide revisions in balloons during conversion.
-
Fallback fonts
- Default fallback fonts - Initialize default fallback fonts for a smoother conversion
- Based on script type - Set fallback fonts based on script type for unsupported glyphs.
- For range of Unicode - Set fallback fonts for characters when glyphs are not available.
-
Font substitution
- Alternate font from installed - Use alternate installed fonts when the original fonts are not available during Word to PDF conversion.
- Alternate font without installing - Use alternate fonts without requiring font installation.
The Syncfusion® DocIO is a .NET Word library allows you to add advanced Word document processing functionalities to any .NET application and does not require Microsoft Word application to be installed in the machine. It is a non-UI component that provides a full-fledged document instance model similar to the Microsoft Office COM libraries to iterate with the document elements explicitly and perform necessary manipulation.
Take a moment to peruse the documentation, where you can find basic Word document processing options along with the features like mail merge, merge, split and compare documents, find and replace text in the Word document, protect the Word documents, and most importantly, the PDF and Image conversions with code examples.
- Microsoft Word 97-2003
- Microsoft Word 2007
- Microsoft Word 2010
- Microsoft Word 2013
- Microsoft Word 2016
- Microsoft Word 2019
- Microsoft 365
- Creates, reads, and edits popular text file formats like DOC, DOT, DOCM, DOTM, DOCX, DOTX, HTML, RTF, TXT, and XML (WordML).
- Converts Word documents also to PDF, Image, and ODT files.
- Download this project to a location in your disk.
- Open the solution file using Visual Studio.
- Rebuild the solution to install the required NuGet packages.
- Run the application.
- Product page: Syncfusion® Word Framework
- Documentation: Convert Word document to PDF using Syncfusion® Word library
- GitHub Examples: Syncfusion® Word library examples
- Online demo: Syncfusion® Word library - Online demos
For any other queries, reach our Syncfusion® support team or post the queries through the community forums.
Request new feature through Syncfusion® feedback portal.
This is a commercial product and requires a paid license for possession or use. Syncfusion's licensed software, including this component, is subject to the terms and conditions of Syncfusion's EULA. You can purchase a licnense here or start a free 30-day trial here.