From afdc4621bfa1332af06de0a264730d0af2815b4f Mon Sep 17 00:00:00 2001 From: Viswajith-SF4658 Date: Wed, 22 Jul 2026 13:03:31 +0530 Subject: [PATCH 1/7] Task 1042877: Revamp User Guide Documentation in Word-to-PDF Conversion --- .../NET/Assemblies-required-word-to-pdf.md | 28 ++- ...ument-to-PDF-in-Azure-App-Service-Linux.md | 4 +- ...ent-to-PDF-in-Azure-App-Service-Windows.md | 2 +- .../Convert-Word-Document-to-PDF-in-Azure.md | 2 +- ...rd-Document-to-PDF-in-Google-App-Engine.md | 6 +- ...Convert-Word-Document-to-PDF-in-Xamarin.md | 4 +- .../NET/Fallback-fonts-word-to-pdf.md | 56 +++-- .../Word-To-PDF/NET/Faqs-word-to-pdf.md | 32 ++- .../NET/Font-substituion-word-to-pdf.md | 28 ++- .../Nuget-packages-required-word-to-pdf.md | 212 +++++++++--------- .../Word-To-PDF/NET/Performance-metrics.md | 14 +- .../NET/Unsupported-elements-word-to-pdf.md | 59 +++-- .../Word-To-PDF/NET/Word-to-pdf-settings.md | 52 +++-- .../multithreading-in-word-to-pdf-faqs.md | 155 ++++++++----- .../NET/word-to-pdf-conversion-faqs.md | 35 ++- .../NET/word-to-pdf-linux-docker.md | 2 +- .../Word-To-PDF/NET/word-to-pdf.md | 100 +++++---- .../Word/Conversions/Word-To-PDF/overview.md | 50 +++-- 18 files changed, 516 insertions(+), 325 deletions(-) diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Assemblies-required-word-to-pdf.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Assemblies-required-word-to-pdf.md index d8010cdf1d..6c921be281 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Assemblies-required-word-to-pdf.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Assemblies-required-word-to-pdf.md @@ -7,8 +7,12 @@ documentation: UG --- # Assemblies required to convert Word document to PDF +This page lists the Syncfusion assemblies that must be referenced in your project to convert a Word document to PDF. The required assemblies differ based on the target platform (WPF, Windows Forms, ASP.NET Core, Blazor, WinUI, .NET MAUI, etc.). Use the tables below to identify the assemblies for your platform, and refer to the linked per-platform guides for step-by-step setup. + ## Converting Word document to PDF +### Active platforms + For converting a Word document to PDF, the following assemblies need to be referenced in your application @@ -39,11 +43,11 @@ T> 1. If you encounter issues while using the .NET Word library in ASP.NET Core, T> 2. Switch to NuGet packages for a seamless experience: T> * Get frequent bug fixes every week. T> * Upgrade quickly with no manual effort. -T> Note: To avoid trail watermark when using NuGet packages, it is recommended to register license key in application. Please refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion® license key in your application to use our components. -T> -T> Refer [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/nuget-packages-required-word-to-pdf) to know more about NuGet packages required. +N> To avoid a trial watermark when using NuGet packages, it is recommended to register a license key in the application. Please refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion® license key in your application to use our components. +N> +N> Refer [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/nuget-packages-required-word-to-pdf) to know more about NuGet packages required. -#### Retired Platforms +### Retired platforms The following assemblies need to be referenced in your application based on the platform. @@ -74,7 +78,7 @@ N> 8. Starting with the v27.1.x, if you reference "Syncfusion.DocIORenderer", yo ## Converting Charts -The following assemblies are required to be referred in addition to the above mentioned assemblies for converting the chart present in the Word document into PDF. +The following assemblies are required to be referenced in addition to the above mentioned assemblies for converting the chart present in the Word document into PDF.
@@ -87,7 +91,7 @@ WPF, Windows Forms, ASP.NET MVC
Syncfusion.OfficeChartToImageConverter.WPF
Syncfusion.SfChart.WPF
-#### Retired Platforms +### Retired platforms The following assemblies need to be referenced in your application based on the platform. @@ -101,4 +105,14 @@ Assembly
ASP.NET
Syncfusion.OfficeChartToImageConverter.WPF
Syncfusion.SfChart.WPF
- \ No newline at end of file + + +## See also + +* [NuGet packages required for Word to PDF conversion](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/nuget-packages-required-word-to-pdf) +* [Word to PDF conversion overview](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf) +* [Word to PDF settings](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings) +* [Fallback fonts for Word to PDF](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/fallback-fonts-word-to-pdf) +* [Licensing overview](https://help.syncfusion.com/common/essential-studio/licensing/overview) +* [Syncfusion Reference Manager add-in](https://help.syncfusion.com/extension/syncfusion-reference-manager/overview) +* [ASP.NET Core DocIO troubleshooting guide](https://support.syncfusion.com/kb/article/16012/troubleshoot-guide-for-aspnet-core-word-docio-library-issues#things-to-check-while-facing-an-issue-in-word-library) \ No newline at end of file diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure-App-Service-Linux.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure-App-Service-Linux.md index 48fe8bf39f..5db504052d 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure-App-Service-Linux.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure-App-Service-Linux.md @@ -12,9 +12,9 @@ Syncfusion® DocIO is a [.NET Word library](https://www.syncfusion **Prerequisites:** -* Visual Studio 2019 or later with the **ASP.NET and web development** workload installed. +* Visual Studio 2022 or later with the **ASP.NET and web development** workload installed. * An Azure account. If you do not have one, create a [free Azure account](https://azure.microsoft.com/free/) before you begin. -* Target framework: .NET 6.0 or later (LTS recommended). +* Target framework: [.NET 8.0 or later](https://dotnet.microsoft.com/en-us/download/dotnet). ## Steps to convert Word document to PDF in Azure App Service on Linux diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure-App-Service-Windows.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure-App-Service-Windows.md index 97192251c1..a838f0cd42 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure-App-Service-Windows.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure-App-Service-Windows.md @@ -13,7 +13,7 @@ Syncfusion® DocIO is a [.NET Core Word library](https://www.syncf ## Prerequisites - An active **Azure subscription**. If you do not have one, create a [free Azure account](https://azure.microsoft.com/free/) before you begin. -- **Visual Studio 2019 or later** with the **ASP.NET and web development** workload installed. +- **Visual Studio 2022 or later** with the **ASP.NET and web development** workload installed. - **.NET 8 SDK** or a later supported version. - A valid Syncfusion® license key. Refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to generate and register your license key. diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure.md index f83fc96384..6ec6feacff 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Azure.md @@ -45,7 +45,7 @@ NuGet package name
{{'[Syncfusion.DocIORenderer.Net.Core](https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core)' | markdownify }}
-N> The `SkiaSharp.NativeAssets.Linux` and `HarfBuzzSharp.NativeAssets.Linux` packages are only required when deploying to Azure App Service (Linux) or other Linux-based Azure hosts. On Windows hosts, the required native assets are bundled with the `Syncfusion.DocIORenderer.Net.Core` NuGet package. For the latest package versions, refer to the [Syncfusion NuGet feed](https://www.nuget.org/profiles/Syncfusion). +N> The `SkiaSharp.NativeAssets.Linux` and `HarfBuzzSharp.NativeAssets.Linux` packages are only required when deploying to Azure App Service (Linux) or other Linux-based Azure hosts. On Windows hosts, the required native assets are bundled with the `Syncfusion.DocIORenderer.Net.Core` NuGet package. ## See Also diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Google-App-Engine.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Google-App-Engine.md index be4ca14f8c..bc7cb62ad1 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Google-App-Engine.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Google-App-Engine.md @@ -46,13 +46,13 @@ Step 4: Click the **Authorize** button. This section creates the local ASP.NET Core project that will later be deployed to App Engine. -Step 1: Open Visual Studio and select the **ASP.NET Core Web App (Model-View-Controller)** template targeting **.NET 8.0**. +Step 1: Open Visual Studio and select the **ASP.NET Core Web App (Model-View-Controller)** template. ![Create ASP.NET Core Web application in Visual Studio](ASP-NET-Core_images/CreateProjectforConversion.png) -Step 2: Configure the project name (for example, **Convert-Word-document-to-PDF**), choose a location, and ensure the **.NET 8.0** framework is selected. +Step 2: Configure the project name (for example, **Convert-Word-document-to-PDF**), choose a location and click **Next**. ![Configure project name and framework](GCP_Images/GAE_Images/Configuration_WordtoPDF.png) -Step 3: Click the **Create** button. +Step 3: Select **.NET 8.0** framework and Click the **Create** button. ![Create ASP.NET Core Web application in Visual Studio](GCP_Images/GAE_Images/Additional-Information-WordtoPDF.png) Step 4: Install the following **NuGet packages** in your application from [Nuget.org](https://www.nuget.org/). diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Xamarin.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Xamarin.md index 531ca4c1bf..c588d8cc73 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Xamarin.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Xamarin.md @@ -119,9 +119,11 @@ using (WordDocument document = new WordDocument(assembly.GetManifestResourceStre } {% endhighlight %} -N> **Embedded resource:** The input `Template.docx` must be added to the .NET Standard project and its **Build Action** set to **EmbeddedResource** in the Properties window. The file path used in `GetManifestResourceStream` (for example, `Convert-Word-Document-to-PDF.Template.Input.docx`) must match the project's default namespace followed by the folder and file name. {% endtabs %} +N> **Embedded resource:** The input `Template.docx` must be added to the .NET Standard project and its **Build Action** set to **EmbeddedResource** in the Properties window. The file path used in `GetManifestResourceStream` (for example, `Convert-Word-Document-to-PDF.Template.Input.docx`) must match the project's default namespace followed by the folder and file name. + + ## Helper files for Xamarin Refer the below helper files and add them into the mentioned project. These helper files allow you to save the stream as a physical file and open the file for viewing. diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Fallback-fonts-word-to-pdf.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Fallback-fonts-word-to-pdf.md index c7db2a22f5..8e820446a9 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Fallback-fonts-word-to-pdf.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Fallback-fonts-word-to-pdf.md @@ -1,6 +1,6 @@ --- title: Fallback fonts in Word to PDF Conversion in C# | DocIO | Syncfusion -description: Learn about how to specify fallback fonts during Word to PDF conversion using the .NET Word (DocIO) library.. +description: Learn how to specify fallback fonts during Word to PDF conversion using the .NET Word (DocIO) library. platform: document-processing control: DocIO documentation: UG @@ -8,18 +8,32 @@ documentation: UG # Fallback fonts in Word to PDF Conversion -During Word to PDF conversions, if a glyph of the input text is unavailable in the specified font, the text will not be rendered properly. To address this, the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) allows users to specify fallback fonts. When a glyph is missing, the library will use one of the fallback fonts to render the text correctly in the output PDF document. +During Word to PDF conversions, if a glyph of the input text is unavailable in the specified font, the text will not be rendered properly. To address this, the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) allows developers to specify fallback fonts. When a glyph is missing, the library uses one of the fallback fonts to render the text correctly in the output PDF document. Users can configure fallback fonts in the following ways: * Initialize default fallback fonts. -* Set custom fonts as fallback fonts for specific script types, including Arabic, Hebrew, Chinese, Japanese, and more. +* Set custom fonts as fallback fonts for specific script types, including Arabic, Hebrew, Chinese, Japanese, Tamil, Korean, and more. +* Set custom fonts as fallback fonts for symbols, mathematics, and emoji. * Set custom fonts as fallback fonts for a particular range of Unicode text. -N> DocIO internally uses user-initialized or specified fallback fonts for Unicode characters during Word to PDF conversion. Therefore, the specified fallback fonts must be installed in the production environment or embedded in the input Word document (DOCX). Otherwise, it will not render the text properly using the fallback fonts. +N> DocIO internally uses the specified fallback fonts for Unicode characters during Word to PDF conversion. Therefore, the specified fallback fonts must be installed in the production environment or embedded in the input Word document (DOCX). Otherwise, the text will not render properly using the fallback fonts. + +## Prerequisites + +To use fallback fonts during Word to PDF conversion, install the required Syncfusion NuGet packages. For more information on NuGet packages and assemblies, refer to the [NuGet packages required for Word to PDF](Nuget-packages-required-word-to-pdf.md) and [Assemblies required for Word to PDF](Assemblies-required-word-to-pdf.md) documentation. + +The following namespaces are used in the code examples throughout this document: + +```csharp +using Syncfusion.DocIO.DLS; +using Syncfusion.DocIORenderer; +using Syncfusion.Office; +using Syncfusion.Pdf; +``` ## Initialize default fallback fonts -The following code example demonstrates how to initialize a default fallback fonts while converting a Word document to PDF. The *InitializeDefault* API sets the default fallback fonts for specific script types like Arabic, Hebrew, Chinese, Japanese etc. +The following code example demonstrates how to initialize the default fallback fonts while converting a Word document to PDF. The `InitializeDefault` API sets the default fallback fonts for specific script types like Arabic, Hebrew, Chinese, Japanese, and others. {% tabs %} @@ -197,7 +211,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Fallback fonts for symbols -The following code example demonstrates how a user can add fallback fonts for Symbols and Emojis, which DocIO considers internally when converting a Word document to PDF. +The following code example demonstrates how users can add fallback fonts for symbols, mathematics, and emojis, which DocIO considers internally when converting a Word document to PDF. {% tabs %} @@ -257,7 +271,7 @@ using (WordDocument wordDocument = new WordDocument("Template.docx", Syncfusion. {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Loads an existing Word document. Using wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx) - 'Adds fallback font for basic symbols Like bullet characters. + 'Adds fallback font for basic symbols like bullet characters. wordDocument.FontSettings.FallbackFonts.Add(ScriptType.Symbols, "Segoe UI Symbol, Arial Unicode MS, Wingdings") 'Adds fallback font for mathematics symbols. wordDocument.FontSettings.FallbackFonts.Add(ScriptType.Mathematics, "Cambria Math, Noto Sans Math, Segoe UI Symbol, Arial Unicode MS") @@ -276,13 +290,15 @@ End Using {% endtabs %} -You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Fallback-symbol-based-on-scripttype/) +You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Fallback-symbol-based-on-scripttype). ## Fallback fonts for range of Unicode text -Users can set fallback fonts for specific Unicode range of text to be used in Word to PDF conversion. +Users can set fallback fonts for a specific range of Unicode characters to be used in Word to PDF conversion. + +The following code example demonstrates how developers can add fallback fonts by using a specific Unicode range that DocIO considers internally while converting a Word document to PDF. -The following code example demonstrates how users can add fallback fonts by using a specific Unicode range of text that DocIO considers internally while converting a Word document to PDF. +N> The `FallbackFont` constructor accepts the start and end of the Unicode range (inclusive) and the font name: `new FallbackFont(rangeStart, rangeEnd, "FontName")`. {% tabs %} @@ -387,9 +403,11 @@ End Using You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Fallback-fonts-for-Unicode-range). -## Modify the exiting fallback fonts +## Modify the existing fallback fonts -The following code example demonstrates how user can modify or customize the existing fallback fonts using *FontNames* API while converting a Word document to PDF. +The following code example demonstrates how users can modify or customize the existing fallback fonts using the `FontNames` API while converting a Word document to PDF. + +N> Calling `InitializeDefault()` populates the `FallbackFonts` collection with the default entries shown in the [Supported script types](#supported-script-types) table. Modifying the `FontNames` property of a `FallbackFont` instance overrides the default font list for that script type only. {% tabs %} @@ -571,7 +589,7 @@ Yu Mincho, MS Mincho -Thai +Thai 0x0E00 - 0x0E7F @@ -582,7 +600,7 @@ Tahoma, Microsoft Sans Serif -Korean +Korean 0xAC00 - 0xD7A3
@@ -806,3 +824,13 @@ Malgun Gothic, Batang Segoe UI Emoji, Noto Color Emoji, Arial Unicode MS + +N> The Unicode ranges in the table are inclusive on both ends. A character belongs to the script type if its code point falls within any listed range. If a character matches multiple script types, DocIO uses the first matching entry when resolving fallback fonts. + +## See also + +* [Font substitution in Word to PDF conversion](Font-substituion-word-to-pdf.md) +* [NuGet packages required for Word to PDF conversion](Nuget-packages-required-word-to-pdf.md) +* [Assemblies required for Word to PDF conversion](Assemblies-required-word-to-pdf.md) +* [Word to PDF conversion settings](Word-to-pdf-settings.md) +* [Frequently asked questions about Word to PDF conversion](Faqs-word-to-pdf.md) diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md index 8a0b9a51a3..1042131e5f 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md @@ -1,6 +1,7 @@ --- -title: Word to PDF conversion FAQs | DocIO | Syncfusion -description: Learn about the frequently asked questions of Word to PDF conversion in the .NET Word (DocIO) library. +title: Word to PDF Conversion FAQs | DocIO | Syncfusion +description: Find answers to common questions about converting Word documents to PDF using Syncfusion DocIO. +keywords: Word to PDF FAQ, DocIO FAQ, Word conversion FAQ, chart conversion, Azure, content controls, multithreading platform: document-processing control: DocIO documentation: UG @@ -10,15 +11,30 @@ documentation: UG The frequently asked questions about Word to PDF conversion in Essential® DocIO are listed below. -* [Could not find Syncfusion.OfficeChartToImageConverter assembly in .NET 3.5 Framework, does it mean there is no support for chart conversion in this Framework?](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-conversion-faqs#could-not-find-syncfusionofficecharttoimageconverter-assembly-in-net-35-framework-does-it-mean-there-is-no-support-for-chart-conversion-in-this-framework) +## Chart conversion + +* [Could not find Syncfusion.OfficeChartToImageConverter assembly in .NET 3.5 Framework. Does it mean there is no support for chart conversion in this framework?](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-conversion-faqs#could-not-find-syncfusionofficecharttoimageconverter-assembly-in-net-35-framework-does-it-mean-there-is-no-support-for-chart-conversion-in-this-framework) + > Note: .NET Framework 3.5 is end-of-life and no longer supported. * [Is it possible to convert 3D charts to PDF?](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-conversion-faqs#is-it-possible-to-convert-3d-charts-to-pdf) + +## PDF conformance and output + * [Is it possible to specify PDF conformance level in Word to PDF conversion?](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-conversion-faqs#is-it-possible-to-specify-pdf-conformance-level-in-word-to-pdf-conversion) -* [Which one is better Azure App Service or Cloud Service for Word to PDF using DocIO?](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-conversion-faqs#which-one-is-better-azure-app-service-or-cloud-service-for-word-to-pdf-using-docio) -* [Why images are preserved as RedX images in Word to PDF conversion?](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-conversion-faqs#why-images-are-preserved-as-redx-images-in-word-to-pdf-conversion) + +## Deployment + +* [Which one is better, Azure App Service or Cloud Service, for Word to PDF using DocIO?](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-conversion-faqs#which-one-is-better-azure-app-service-or-cloud-service-for-word-to-pdf-using-docio) + +## Troubleshooting + +* [Why are images preserved as red-X images in Word to PDF conversion?](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-conversion-faqs#why-images-are-preserved-as-redx-images-in-word-to-pdf-conversion) * [Why are content controls not preserved as editable form fields in the converted PDF document even when PreserveFormFields is enabled?](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-conversion-faqs#why-are-content-controls-not-preserved-as-editable-form-fields-in-the-converted-pdf-document-even-when-preserveformfields-is-enabled) -* [How to perform mail merge in Word document and convert it as PDF in WinForms?](https://support.syncfusion.com/kb/article/19782/how-to-perform-mail-merge-in-word-document-and-convert-it-as-pdf-in-winforms) -* [How to add numbers on pages in HTML to PDF in ASP.NET DocIO?](https://support.syncfusion.com/kb/article/19446/how-to-add-numbers-on-pages-in-html-to-pdf-in-aspnet-docio?isInternalRefresh=False) ## Multithreading -* [Does the Word library support multithreading and thread-safety for Word to PDF conversion?](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/faqs/multithreading-word-to-pdf-faqs#does-the-word-library-support-multithreading-and-thread-safety-for-word-to-pdf-conversion) \ No newline at end of file +* [Does the Word library support multithreading and thread-safety for Word to PDF conversion?](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/faqs/multithreading-word-to-pdf-faqs#does-the-word-library-support-multithreading-and-thread-safety-for-word-to-pdf-conversion) + +## Related knowledge base articles + +* [How to perform mail merge in a Word document and convert it to PDF in WinForms](https://support.syncfusion.com/kb/article/19782/how-to-perform-mail-merge-in-word-document-and-convert-it-as-pdf-in-winforms) +* [How to add numbers on pages in HTML to PDF in ASP.NET DocIO?](https://support.syncfusion.com/kb/article/19446/how-to-add-numbers-on-pages-in-html-to-pdf-in-aspnet-docio?isInternalRefresh=False) \ No newline at end of file diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Font-substituion-word-to-pdf.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Font-substituion-word-to-pdf.md index 1664f52c10..0cef8a1fb9 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Font-substituion-word-to-pdf.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Font-substituion-word-to-pdf.md @@ -8,17 +8,23 @@ documentation: UG # Font Substitution in Word to PDF Conversion -When the necessary fonts used in the Word document has not been installed in the production machine, then Essential® DocIO uses the ”Microsoft Sans Serif” as default font for rendering the text. This leads to preservation difference in generated PDF as each font has different glyphs for characters. To learn more about the default font substitution, click [here](https://support.syncfusion.com/kb/article/6821/what-happens-when-the-word-document-used-fonts-for-a-text-is-not-installed-in-production). +When the necessary fonts used in the Word document have not been installed in the production machine, then Essential® DocIO uses the "Microsoft Sans Serif" as default font for rendering the text. This leads to preservation differences in the generated PDF, as each font has different glyphs for characters. To learn more about the default font substitution, click [here](https://support.syncfusion.com/kb/article/6821/what-happens-when-the-word-document-used-fonts-for-a-text-is-not-installed-in-production). To avoid this, the Essential® DocIO library allows you to set an alternate font for the missing font used in the Word document. -## Use alternate font from installed fonts +The library supports the following font substitution approaches during Word to PDF conversion: + +* **Use an alternate font from installed fonts** – substitute with a font that is already installed on the production machine. +* **Use an alternate font without installing** – load the replacement font from a file stream without installing it on the machine. +* **Embed fonts** – embed the required TrueType font glyphs directly into the converted PDF. For more details, see [Embedding fonts in Word to PDF conversion](./Word-to-pdf-settings.md#embedding-fonts). + +## Use an alternate font from installed fonts You can use any other alternate fonts instead of "Microsoft Sans Serif" to layout and render the text during Word to PDF conversion by using the [SubstituteFont](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.FontSettings.html) event. -N> Hook the [SubstituteFont](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.FontSettings.html#Syncfusion_DocIO_DLS_FontSettings_SubstituteFont) event only after the Word document is loaded to ensure it works correctly. +N> Hook the [SubstituteFont](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.FontSettings.html#Syncfusion_DocIO_DLS_FontSettings_SubstituteFont) event only after the Word document is loaded. This ensures the event fires correctly. -The following code example shows how to use alternate font instead of "Microsoft Sans Serif" when the specified font is not installed in the machine. +The following code example shows how to use an alternate font instead of "Microsoft Sans Serif" when the specified font is not installed in the machine. {% tabs %} @@ -76,7 +82,7 @@ wordDocument.ChartToImageConverter = New ChartToImageConverter() 'Hooks the font substitution event AddHandler wordDocument.FontSettings.SubstituteFont, AddressOf FontSettings_SubstituteFont 'Creates an instance of the DocToPDFConverter -Dim converter As DocToPDFConverter = New DocToPDFConverter +Dim converter As DocToPDFConverter = New DocToPDFConverter() 'Converts Word document into PDF document Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument) 'Unhooks the font substitution event after converting to PDF @@ -142,9 +148,9 @@ End Sub You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Use-alternate-installed-font). -### Event Handler to use alternate font without installing +### Event Handler to use an alternate font without installing -The following code example shows how to use the alternate fonts instead of "Microsoft Sans Serif" **without installing the fonts** into production machine. +The following code example shows how to use alternate fonts instead of "Microsoft Sans Serif" **without installing the fonts** on the production machine. {% tabs %} @@ -152,7 +158,7 @@ The following code example shows how to use the alternate fonts instead of "Micr private void FontSettings_SubstituteFont(object sender, SubstituteFontEventArgs args) { //Sets the alternate font when a specified font is not installed in the production environment - if (args.OrignalFontName == "Arial Unicode MS") + if (args.OriginalFontName == "Arial Unicode MS") { //Sets the alternate font based on the font style. switch (args.FontStyle) @@ -175,7 +181,7 @@ private void FontSettings_SubstituteFont(object sender, SubstituteFontEventArgs private void FontSettings_SubstituteFont(object sender, SubstituteFontEventArgs args) { //Sets the alternate font when a specified font is not installed in the production environment - if (args.OrignalFontName == "Arial Unicode MS") + if (args.OriginalFontName == "Arial Unicode MS") { //Sets the alternate font based on the font style. switch (args.FontStyle) @@ -195,9 +201,9 @@ private void FontSettings_SubstituteFont(object sender, SubstituteFontEventArgs {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -Private Sub SubstituteFont(ByVal sender As Object, ByVal args As SubstituteFontEventArgs) +Private Sub FontSettings_SubstituteFont(ByVal sender As Object, ByVal args As SubstituteFontEventArgs) 'Sets the alternate font when a specified font is not installed in the production environment - If args.OrignalFontName = "Arial Unicode MS" Then + If args.OriginalFontName = "Arial Unicode MS" Then 'Sets the alternate font based on the font style. Select Case args.FontStyle Case FontStyle.Italic diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md index c806025f3d..c03a8dcf23 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md @@ -1,4 +1,4 @@ ---- +--- title: NuGet Packages Required to Convert Word to PDF | Syncfusion description: Learn the NuGet packages required to Convert Word document to PDF using the .NET Word (DocIO) library. platform: document-processing @@ -8,9 +8,9 @@ documentation: UG # NuGet Packages Required to Convert Word to PDF -## Converting Word document to PDF +## Converting a Word Document to PDF -For converting Word document into PDF, the following NuGet packages need to be installed in your application. +For converting a Word document into PDF, the following NuGet packages need to be installed in your application. @@ -26,12 +26,13 @@ Package manager console command + + - - - - - - - - - - +
-{{'[Windows Forms](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-window-forms)'|  markdownify }}, Console Application (Targeting .NET Framework) +{{'[Windows Forms](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-windows-forms)'|  markdownify }}, Console Application (Targeting .NET Framework) -Syncfusion.DocToPdfConverter.WinForms.nupkg +Syncfusion.DocToPdfConverter.WinForms Install-Package Syncfusion.DocToPdfConverter.WinForms @@ -39,43 +40,22 @@ Install-Package Syncfusion.DocToPdfConverter.WinForms
-{{'[WPF](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-wpf)'|  markdownify }} +{{'[WPF](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-wpf)'|  markdownify }} -Syncfusion.DocToPdfConverter.Wpf.nupkg +Syncfusion.DocToPdfConverter.Wpf Install-Package Syncfusion.DocToPdfConverter.Wpf
-.NET Framework 3.5 or 4.0 Client Profile - -Syncfusion.DocToPdfConverter.ClientProfile.nupkg - -Install-Package Syncfusion.DocToPdfConverter.ClientProfile -
-{{'[ASP.NET MVC4](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-mvc)'|  markdownify }} - -Syncfusion.DocToPdfConverter.AspNet.Mvc4.nupkg - -Install-Package Syncfusion.DocToPdfConverter.AspNet.Mvc4 -
-{{'[ASP.NET MVC5](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-mvc)'|  markdownify }} +{{'[ASP.NET MVC5](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-mvc)'|  markdownify }} -Syncfusion.DocToPdfConverter.AspNet.Mvc5.nupkg +Syncfusion.DocToPdfConverter.AspNet.Mvc5 Install-Package Syncfusion.DocToPdfConverter.AspNet.Mvc5 @@ -83,13 +63,13 @@ Install-Package Syncfusion.DocToPdfConverter.AspNet.Mvc5
-{{'[ASP.NET Core](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-core)'|  markdownify }}, Console Application (Targeting .NET Core) and {{'[Blazor](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-blazor)'|  markdownify }} +{{'[ASP.NET Core](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-core)'|  markdownify }}, Console Application (Targeting .NET Core) and {{'[Blazor](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-blazor)'|  markdownify }} -Syncfusion.DocIORenderer.Net.Core.nupkg
+Syncfusion.DocIORenderer.Net.Core

Note:
-Please refer {{'[here](https://help.syncfusion.com/document-processing/word/word-library/net/faq#what-are-the-nuget-packages-to-be-installed-to-perform-word-to-pdf-conversion-in-linux-os)'| markdownify }} to know about the NuGet packages that need to be installed to perform Word to PDF conversion in Linux OS.
+Please refer {{'[here](https://help.syncfusion.com/document-processing/word/word-library/net/faq#what-are-the-nuget-packages-to-be-installed-to-perform-word-to-pdf-conversion-in-linux-os)'| markdownify }} to know about the NuGet packages that need to be installed to perform Word to PDF conversion in Linux OS.
Install-Package Syncfusion.DocIORenderer.Net.Core @@ -97,15 +77,16 @@ Install-Package Syncfusion.DocIORenderer.Net.Core
-{{'[Windows UI Library (WinUI)](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-winui)'|  markdownify }}
{{'[.NET Multi-platform App UI (.NET MAUI)](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-maui)'|  markdownify }} +{{'[Windows UI Library (WinUI)](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-winui)'|  markdownify }}
{{'[.NET Multi-platform App UI (.NET MAUI)](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-maui)'|  markdownify }}
-Syncfusion.DocIORenderer.NET +Syncfusion.DocIORenderer.NET Install-Package Syncfusion.DocIORenderer.NET
T> If you encounter issues while using the .NET Word library in ASP.NET Core, refer to the [troubleshooting guide](https://support.syncfusion.com/kb/article/16012/troubleshoot-guide-for-aspnet-core-word-docio-library-issues#things-to-check-while-facing-an-issue-in-word-library) for recommended checks and solutions. @@ -133,7 +114,7 @@ Package manager console command {{'[ASP.NET](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net)' | markdownify}}
-Syncfusion.DocToPdfConverter.AspNet.nupkg +Syncfusion.DocToPdfConverter.AspNet Install-Package Syncfusion.DocToPdfConverter.AspNet @@ -141,27 +122,52 @@ Install-Package Syncfusion.DocToPdfConverter.AspNet -{{'[Xamarin](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-xamarin)'|  markdownify }}
+{{'[ASP.NET MVC4](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-mvc)'|  markdownify }} + + +Syncfusion.DocToPdfConverter.AspNet.Mvc4 + + +Install-Package Syncfusion.DocToPdfConverter.AspNet.Mvc4 + + + + +{{'[Xamarin](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-xamarin)'|  markdownify }}
-Syncfusion.DocIORenderer.NET +Syncfusion.Xamarin.DocIORenderer Install-Package Syncfusion.Xamarin.DocIORenderer + -N> 1. Starting with v16.2.0.x, if you reference Syncfusion® assemblies from trial setup or from the NuGet feed, you also have to add "Syncfusion.Licensing" assembly reference and include a license key in your projects. Please refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion® license key in your application to use our components. +N> 1. Starting with v16.2.0.x, if you reference Syncfusion® assemblies from trial setup or from the NuGet feed, you also have to add the "Syncfusion.Licensing" assembly reference and include a license key in your projects. Please refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering the Syncfusion® license key in your application to use our components. N> 2. Syncfusion® components are available in [nuget.org](https://www.nuget.org/) N> 3. Please refer the procedure to deploy your .NET Core application in Linux OS from [here](https://support.syncfusion.com/kb/article/7626/how-to-deploy-net-core-application-with-word-to-pdf-conversion-capabilities-in-linux-os). N> 4. From v32.1.19, the dependent package SkiaSharp is upgraded from 3.116.1 to 3.119.1 version and it is mandatory to use SkiaSharp.NativeAssets.Linux v3.119.1 and HarfBuzzSharp.NativeAssets.Linux v8.3.1.2 packages for converting Word documents into PDF in Linux environment. -N> 5. "DocIO supports Word to PDF conversion in UWP application using DocIORenderer." For further information, please refer [here](https://support.syncfusion.com/kb/article/8902/how-to-convert-word-document-to-pdf-in-uwp) -N> 6. Syncfusion has **deprecated the ASP.NET package**. We strongly recommend upgrading your applications to ASP.NET Core. Refer [here](https://help.syncfusion.com/document-processing/word/word-library/net/faqs/migrate-from-net-framework-to-net-core) to migrate from .NET Framework to .NET Core. +N> 5. "DocIO supports Word to PDF conversion in a UWP application using DocIORenderer." For further information, please refer [here](https://support.syncfusion.com/kb/article/8902/how-to-convert-word-document-to-pdf-in-uwp) +N> 6. Syncfusion has **deprecated the Syncfusion.DocToPdfConverter.AspNet package**. We strongly recommend upgrading your applications to ASP.NET Core. Refer [here](https://help.syncfusion.com/document-processing/word/word-library/net/faqs/migrate-from-net-framework-to-net-core) to migrate from .NET Framework to .NET Core. ### Additional NuGet packages required for Linux -The SkiaSharp and HarfBuzzSharp native asset NuGet packages are required as additional dependencies when deploying your application in Linux environments. There are two types of NuGet packages—choose the appropriate ones based on your specific Linux environment. +The SkiaSharp and HarfBuzzSharp native asset NuGet packages are required as additional dependencies when deploying your application in Linux environments. There are two types of NuGet packages. Choose the appropriate ones based on your specific Linux environment. + +Run one of the following commands in the Package Manager Console (or use `dotnet add package` for SDK-style projects): + +```powershell +// Common Linux distributions, Azure App Service, Google App Engine +Install-Package SkiaSharp.NativeAssets.Linux -Version 3.119.1 +Install-Package HarfBuzzSharp.NativeAssets.Linux -Version 8.3.1.2 +``` + +```powershell +// AWS Lambda, AWS Elastic Beanstalk (use the NoDependencies variant) +Install-Package SkiaSharp.NativeAssets.Linux.NoDependencies -Version 3.119.1 +``` The following table illustrates the native assets NuGet packages and their applicable Linux environments: @@ -202,7 +208,9 @@ The following table illustrates the native assets NuGet packages and their appli ## Converting Charts -The following NuGet package need to be installed additionally to preserve chart as image in Word to PDF conversion. +The following NuGet package needs to be installed additionally to preserve a chart as image in Word to PDF conversion. + +> **Note:** The chart-to-image converter package is only required for .NET Framework targets (WinForms, WPF, ASP.NET MVC4, ASP.NET MVC5, and the retired ASP.NET). For ASP.NET Core, Blazor, WinUI, .NET MAUI, and Xamarin, the base `Syncfusion.DocIORenderer.Net.Core` or `Syncfusion.DocIORenderer.NET` package handles chart rendering natively and no additional chart package is needed. @@ -223,7 +231,7 @@ Package manager console command Windows Forms, Console Application (Targeting .NET Framework) - - - - - +
-Syncfusion.OfficeChartToImageConverter.WinForms.nupkg +Syncfusion.OfficeChartToImageConverter.WinForms Install-Package Syncfusion.OfficeChartToImageConverter.WinForms @@ -234,7 +242,7 @@ Install-Package Syncfusion.OfficeChartToImageConverter.WinForms WPF -Syncfusion.OfficeChartToImageConverter.Wpf.nupkg +Syncfusion.OfficeChartToImageConverter.Wpf Install-Package Syncfusion.OfficeChartToImageConverter.Wpf @@ -242,31 +250,21 @@ Install-Package Syncfusion.OfficeChartToImageConverter.Wpf
-ASP.NET MVC4 - -Syncfusion.OfficeChartToImageConverter.AspNet.Mvc4.nupkg - -Install-Package Syncfusion.OfficeChartToImageConverter.AspNet.Mvc4 -
ASP.NET MVC5 -Syncfusion.OfficeChartToImageConverter.AspNet.Mvc5.nupkg +Syncfusion.OfficeChartToImageConverter.AspNet.Mvc5 Install-Package Syncfusion.OfficeChartToImageConverter.AspNet.Mvc5
-#### Retired Platforms +#### Retired Platforms (Charts) -The following NuGet packages need to be included in your application based on the platform. +The following NuGet packages need to be included in your application based on the retired platform. @@ -287,12 +285,24 @@ Package manager console command ASP.NET
+ + + + + +
-Syncfusion.OfficeChartToImageConverter.AspNet.nupkg +Syncfusion.OfficeChartToImageConverter.AspNet Install-Package Syncfusion.OfficeChartToImageConverter.AspNet
+ASP.NET MVC4 + +Syncfusion.OfficeChartToImageConverter.AspNet.Mvc4 + +Install-Package Syncfusion.OfficeChartToImageConverter.AspNet.Mvc4 +
## NuGet Package Installation and Uninstallation @@ -307,27 +317,27 @@ DocIO NuGet packages can be installed and uninstalled using Package Manager Cons The package contains the DocToPdfConverter .NET library that allows you to convert the Word documents to PDF. -~~~ +```powershell // Install package Install-Package Syncfusion.DocToPdfConverter.WinForms -~~~ -~~~ +``` +```powershell // Uninstall package Uninstall-Package Syncfusion.DocToPdfConverter.WinForms -RemoveDependencies -~~~ +``` **NuGet Package:** Syncfusion.OfficeChartToImageConverter.WinForms The package contains OfficeChartToImageConverter .NET library for converting the chart present in word document to image. -~~~ +```powershell // Install package Install-Package Syncfusion.OfficeChartToImageConverter.WinForms -~~~ -~~~ +``` +```powershell // Uninstall package Uninstall-Package Syncfusion.OfficeChartToImageConverter.WinForms -RemoveDependencies -~~~ +``` ### WPF @@ -335,27 +345,27 @@ Uninstall-Package Syncfusion.OfficeChartToImageConverter.WinForms -RemoveDepende The package contains the DocToPdfConverter .NET library that allows you to convert the Word documents to PDF. -~~~ +```powershell // Install package Install-Package Syncfusion.DocToPdfConverter.Wpf -~~~ -~~~ +``` +```powershell // Uninstall package Uninstall-Package Syncfusion.DocToPdfConverter.Wpf -RemoveDependencies -~~~ +``` **NuGet Package:** Syncfusion.OfficeChartToImageConverter.Wpf The package contains OfficeChartToImageConverter .NET library for converting the chart present in word document to image. -~~~ +```powershell // Install package Install-Package Syncfusion.OfficeChartToImageConverter.Wpf -~~~ -~~~ +``` +```powershell // Uninstall package Uninstall-Package Syncfusion.OfficeChartToImageConverter.Wpf -RemoveDependencies -~~~ +``` ### ASP.NET MVC4 @@ -363,27 +373,27 @@ Uninstall-Package Syncfusion.OfficeChartToImageConverter.Wpf -RemoveDependencies The package contains the DocToPdfConverter .NET library that allows you to convert the Word documents to PDF. -~~~ +```powershell // Install package Install-Package Syncfusion.DocToPdfConverter.AspNet.Mvc4 -~~~ -~~~ +``` +```powershell // Uninstall package Uninstall-Package Syncfusion.DocToPdfConverter.AspNet.Mvc4 -RemoveDependencies -~~~ +``` **NuGet Package:** Syncfusion.OfficeChartToImageConverter.AspNet.Mvc4 The package contains OfficeChartToImageConverter .NET library for converting the chart present in word document to image. -~~~ +```powershell // Install package Install-Package Syncfusion.OfficeChartToImageConverter.AspNet.Mvc4 -~~~ -~~~ +``` +```powershell // Uninstall package Uninstall-Package Syncfusion.OfficeChartToImageConverter.AspNet.Mvc4 -RemoveDependencies -~~~ +``` ### ASP.NET MVC5 @@ -391,52 +401,52 @@ Uninstall-Package Syncfusion.OfficeChartToImageConverter.AspNet.Mvc4 -RemoveDepe The package contains the DocToPdfConverter .NET library that allows you to convert the Word documents to PDF. -~~~ +```powershell // Install package Install-Package Syncfusion.DocToPdfConverter.AspNet.Mvc5 -~~~ -~~~ +``` +```powershell // Uninstall package Uninstall-Package Syncfusion.DocToPdfConverter.AspNet.Mvc5 -RemoveDependencies -~~~ +``` **NuGet Package:** Syncfusion.OfficeChartToImageConverter.AspNet.Mvc5 The package contains OfficeChartToImageConverter .NET library for converting the chart present in word document to image. -~~~ +```powershell // Install package Install-Package Syncfusion.OfficeChartToImageConverter.AspNet.Mvc5 -~~~ -~~~ +``` +```powershell // Uninstall package Uninstall-Package Syncfusion.OfficeChartToImageConverter.AspNet.Mvc5 -RemoveDependencies -~~~ +``` ### ASP.NET Core and Blazor **NuGet Package:** Syncfusion.DocIORenderer.Net.Core The package contains the DocIORenderer .NET portable library that allows you to convert the Word documents to PDF. -~~~ +```powershell // Install package Install-Package Syncfusion.DocIORenderer.Net.Core -~~~ -~~~ +``` +```powershell // Uninstall package Uninstall-Package Syncfusion.DocIORenderer.Net.Core -RemoveDependencies -~~~ +``` ### Windows UI Library (WinUI) and .NET Multi-platform App UI (.NET MAUI) **NuGet Package:** Syncfusion.DocIORenderer.NET The package contains the DocIORenderer .NET library that allows you to convert the Word documents to PDF. -~~~ +```powershell // Install package Install-Package Syncfusion.DocIORenderer.NET -~~~ -~~~ +``` +```powershell // Uninstall package Uninstall-Package Syncfusion.DocIORenderer.NET -RemoveDependencies -~~~ +``` diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Performance-metrics.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Performance-metrics.md index 9a366019c9..66850e1c0f 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Performance-metrics.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Performance-metrics.md @@ -1,5 +1,5 @@ --- -title: Word to PDF Performance benchmark results | Syncfusion +title: Word to PDF performance benchmark results | Syncfusion description: Explore the performance benchmark results of Word to PDF conversion using the .NET Word Library with different page counts platform: document-processing control: DocIO @@ -8,7 +8,7 @@ documentation: UG # Word to PDF performance benchmarks using .NET Word Library -The Syncfusion® .NET Word library (DocIO) enables high-performance Word document processing, including conversion to PDF. This performance benchmark report highlights the speed and efficiency of Word to PDF conversion, demonstrating how our library performs across varying document sizes in real-world scenarios. +The Syncfusion® .NET Word library (DocIO) enables high-performance Word document processing, including conversion to PDF. This performance benchmark report highlights the speed and efficiency of Word to PDF conversion, demonstrating how our library performs across different conversion operations on representative workloads. ## Environment @@ -20,10 +20,18 @@ The following system configurations were used for benchmarking: * **.NET Version:** .NET 8.0 * **Syncfusion® Version:** [Syncfusion.DocIORenderer.Net.Core v33.1.44](https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/33.1.44) +## Test methodology + +* All measurements were taken on an idle system with no other significant background processes running. +* Each operation was executed for **3 iterations** after a warm-up run, and the reported time is the **average** of the measured iterations. +* Conversions were run **single-threaded** with default garbage collection settings. +* Time values are reported in **seconds (sec)** and rounded to two decimal places for consistency. + ## Benchmark Results -The table below shows the performance results of various Word document operations, evaluated using predefined input conditions in the previously described environment. +The table below shows the performance results of various Word to PDF conversion operations, evaluated using predefined input conditions in the previously described environment. Each row lists the operation, the number of pages in the sample document, the average conversion time, and a link to the corresponding GitHub example. +> **Note:** The "Word to PDF" baseline row uses a 100-page sample to reflect a realistic large-document workload, while the other rows use small (1–2 page) sample documents to isolate the overhead of each individual option. Times are therefore **not directly comparable across rows**; they are intended to illustrate the relative cost of enabling each option on a similar small document. diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Unsupported-elements-word-to-pdf.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Unsupported-elements-word-to-pdf.md index 64fe6ca2d4..203cee7ba5 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Unsupported-elements-word-to-pdf.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Unsupported-elements-word-to-pdf.md @@ -8,7 +8,7 @@ documentation: UG # Limitations in Word to PDF Conversion -The following tables shows the limitations of Word to PDF conversion. +The following table shows the limitations of Word to PDF conversion.
Operation
@@ -30,7 +30,7 @@ Only DOCX and WordML format documents are supported. Chart @@ -81,7 +81,7 @@ Mathematical equations extending to multiple lines will be rendered in a single SmartArt @@ -94,10 +94,18 @@ Not supported + + + + @@ -105,12 +113,12 @@ First watermark of the Word document should be applied to the entire converted P Multi-Column Texts
- Only DOCX and WordML format documents are supported from .NET Framework 4.0 onwards. + Only DOCX and WordML format documents are supported on .NET Framework 4.0 and later, as well as on .NET, ASP.NET Core, Blazor, WinUI, .NET MAUI, and Xamarin.

The following chart types are not supported on all platforms:
    @@ -62,7 +62,7 @@ Only DOCX and WordML format documents are supported.
-Custom Shapes +Custom Shapes Only DrawingML custom shapes in DOCX and WordML format documents are supported. @@ -73,7 +73,7 @@ Only DrawingML custom shapes in DOCX and WordML format documents are supported. Equation -Mathematical equations extending to multiple lines will be rendered in a single line and content exceeding the right margin will clip in the PDF. +Mathematical equations extending to multiple lines will be rendered in a single line and content exceeding the right margin will be clipped in the PDF.
-Supported only in DOCX format document to PDF. Additional behavior explained {{ '[here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/unsupported-elements-word-to-pdf#smartart)' | markdownify }}. +Supported only in DOCX format document to PDF. Additional behavior is explained in the [SmartArt](#smartart) section below.
+Drawing Canvas + +Not supported programmatically. See the [Drawing Canvas](#drawing-canvas) section below for details. +
Watermark -First watermark of the Word document should be applied to the entire converted PDF document when the Word document have multiple watermarks. +The first watermark of the Word document is applied to the entire converted PDF document when the Word document has multiple watermarks.
-Multi-Column text positions are calculated dynamically when layout the text. So, there may be some content position differences occur in the PDF document. +Multi-Column text positions are calculated dynamically when laying out the text. As a result, there may be some content position differences in the PDF document.
-Footnote and endnote +Footnote and Endnote Number formats in Roman, Alphabets, and Arabic only supported. @@ -118,7 +126,7 @@ Number formats in Roman, Alphabets, and Arabic only supported.
-Textbox +TextBox Linked text boxes are not supported. @@ -126,10 +134,10 @@ Linked text boxes are not supported.
-Ink elements +Ink Elements -Supported only in DOCX format document to PDF. Additional behavior explained {{ '[here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/unsupported-elements-word-to-pdf#ink)' | markdownify }}. +Supported only in DOCX format document to PDF. Additional behavior is explained in the [Ink](#ink) section below.
@@ -154,7 +162,7 @@ Only DOCX and WordML format documents are supported. Pagination -The Essential® DocIO makes sensible decision when layout the text, and its supported elements while generating the PDF documents. But however, there may not be guaranteed pagination with all the documents. +DocIO makes sensible decisions when laying out the text and its supported elements while generating the PDF documents. However, pagination is not guaranteed for all documents. @@ -178,7 +186,7 @@ Not supported Borders -Using of patterns and 3D borders are not retained in the output PDF document. +Pattern fills and 3D borders are not retained in the output PDF document. @@ -239,7 +247,7 @@ Some elements have additional limitations or require manual steps to ensure accu SmartArt typically contains graphic properties, including bounds information for SmartArt and its nodes. When creating or modifying SmartArt using the Syncfusion Word Library, these graphic properties (e.g., bounds information) are not generated. Due to this limitation, SmartArt created or modified using the Syncfusion Word Library may not be accurately preserved during Word-to-PDF and image conversions. -**To resolve this**, first save the document using DocIO before converting it to a PDF or image. Then, open the saved document in Microsoft Word, save it again, and finally convert it to a PDF or image using DocIO. This regenerates the required SmartArt properties, ensuring accurate output. +**To resolve this**, save the document using DocIO first, then open the saved document in Microsoft Word and save it again. Finally, convert it to a PDF or image using DocIO. This regenerates the required SmartArt properties, ensuring accurate output. ### Drawing Canvas @@ -249,13 +257,15 @@ Creating, editing, or cloning Drawing Canvas elements programmatically is not su During Word-to-PDF and Word-to-Image conversions, Syncfusion Word Library uses fallback images embedded in the document to preserve the Ink visual appearance. However, when Ink is created or modified using the Syncfusion Word Library, some Ink effects cannot be rendered accurately due to rendering engine limitations. Although the Ink stroke geometry is preserved, visual brush effects are lost. -**To resolve this**, save the created or modified document using DocIO first in DOCX format. Then, open the saved document in Microsoft Word and save it again. Finally, convert it to PDF or Image using DocIO. This process regenerates the required Ink fallback images, ensuring accurate visual output. +**To resolve this**, save the created or modified document using DocIO first in DOCX format, then open the saved document in Microsoft Word and save it again. Finally, convert it to PDF or Image using DocIO. This process regenerates the required Ink fallback images, ensuring accurate visual output. ## Show Warning for Unsupported Elements -When converting a Word document to a PDF, the presence of unsupported elements in the input Word document can lead to preservation issues in the converted PDF. The .NET Word library (DocIO) contains [Warning](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverterSettings.html#Syncfusion_DocToPDFConverter_DocToPDFConverterSettings_Warning) API, which helps to detect and handle these unsupported elements during the conversion process. This API holds the information of unsupported elements once found in the input Word document. +> **Prerequisites:** Refer to the [NuGet packages required for Word to PDF conversion](nuget-packages-required-word-to-pdf.md) and ensure the required assemblies are referenced in your project. -Users can display warning messages for the unsupported elements using the [WarningType](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WarningInfo.html#Syncfusion_DocIO_DLS_WarningInfo_WarningType) during Word to PDF conversion. Users can set a flag to stop the conversion process based on the warning. +When converting a Word document to a PDF, the presence of unsupported elements in the input Word document can lead to preservation issues in the converted PDF. The .NET Word library (DocIO) provides the [Warning](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverterSettings.html#Syncfusion_DocToPDFConverter_DocToPDFConverterSettings_Warning) API (and the equivalent [DocIORenderer.Settings.Warning](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIORenderer.DocIORendererSettings.html#Syncfusion_DocIORenderer_DocIORendererSettings_Warning) for cross-platform scenarios), which helps to detect and handle these unsupported elements during the conversion process. This API holds the information of unsupported elements found in the input Word document. + +Users can display warning messages for the unsupported elements using the [WarningType](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WarningInfo.html#Syncfusion_DocIO_DLS_WarningInfo_WarningType) enumeration during Word to PDF conversion. Users can also set a flag to stop the conversion process when a warning is encountered. The following code demonstrates how to stop conversion if the input Word document has an unsupported element like SmartArt during Word to PDF conversion. @@ -275,7 +285,7 @@ using (FileStream fileStream = new FileStream("Input.docx", FileMode.Open)) //Converts Word document into a PDF document. using (PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument)) { - //If the IsCanceled boolean is enabled, the input document will contain an unsupported element. + //If the IsCanceled property is true, the input document contained an unsupported element. if (renderer.IsCanceled) { Console.WriteLine("The execution stopped due to unsupported element."); @@ -299,8 +309,8 @@ using (FileStream fileStream = new FileStream("Input.docx", FileMode.Open)) WordDocument wordDocument = new WordDocument("Input.docx"); DocToPDFConverter converter = new DocToPDFConverter(); converter.Settings.Warning = new DocumentWarning(); -PdfDocument pdfDocument = converter.ConvertToPDF(document); -//If the IsCanceled boolean is enabled, the input document will contain an unsupported element. +PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument); +//If the IsCanceled property is true, the input document contained an unsupported element. if (converter.IsCanceled) { Console.WriteLine("The execution stopped due to unsupported element."); @@ -320,9 +330,9 @@ else Dim wordDocument As New WordDocument("Input.docx") Dim converter As New DocToPDFConverter() converter.Settings.Warning = New DocumentWarning() -Dim pdfDocument As PdfDocument = converter.ConvertToPDF(document) +Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument) -' If the IsCanceled boolean is enabled, the input document will contain an unsupported element. +' If the IsCanceled property is true, the input document contained an unsupported element. If converter.IsCanceled Then Console.WriteLine("The execution stopped due to unsupported element.") Console.ReadKey() @@ -337,11 +347,14 @@ End If {% endtabs %} -The following code demonstrates how to initialize the [Warning](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverterSettings.html#Syncfusion_DocToPDFConverter_DocToPDFConverterSettings_Warning) API and display warning messages for all unsupported elements in the input document. Additionally, this code shows how to set a flag to stop Word to PDF conversion if an unsupported element is identified. +The following code demonstrates how to implement the [IWarning](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.IWarning.html) interface and display warning messages for all unsupported elements in the input document. Additionally, this code shows how to set a flag to stop Word to PDF conversion if an unsupported element is identified. The same `DocumentWarning` class is used by both the cross-platform (`DocIORenderer`) and Windows-specific (`DocToPDFConverter`) workflows. + +The supported [WarningType](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WarningInfo.html#Syncfusion_DocIO_DLS_WarningInfo_WarningType) values include (but are not limited to): `SmartArt`, `Ink`, `Chart`, `Shape`, `TextBox`, `Watermark`, and `Equation`. Refer to the API reference for the complete list. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} +//The same class is used for the Windows-specific workflow. public class DocumentWarning : IWarning { public bool ShowWarnings(List warningInfo) diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Word-to-pdf-settings.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Word-to-pdf-settings.md index 6ce9fe9dee..b06a98c8fe 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Word-to-pdf-settings.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Word-to-pdf-settings.md @@ -163,7 +163,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Accessible PDF document -This setting allows you to determine whether to preserve document structured tags in the converted **PDF document for accessibility (508 compliance) support**. This property will set the title and description for images, diagrams and other objects in the generated PDF document. This information will be useful for **people with vision or cognitive impairments** who may not able to see or understand the object +This setting allows you to determine whether to preserve document structured tags in the converted **PDF document for accessibility (508 compliance) support**. This property will set the title and description for images, diagrams and other objects in the generated PDF document. This information will be useful for **people with vision or cognitive impairments** who may not be able to see or understand the object. The following code sample shows how to preserve document structured tags in the converted PDF document. @@ -228,7 +228,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Word document headings to PDF bookmarks -This setting allows you to determine whether to **preserve Word document headings** (i.e., paragraph with heading style and outline level) as bookmarks in the converted PDF document. As per Microsoft Word behavior, either Word document headings or bookmarks can be exported as PDF bookmarks. By default, DocIO preserves Word documents bookmarks as PDF bookmarks in converted PDF document. +This setting allows you to determine whether to **preserve Word document headings** (i.e., paragraph with heading style and outline level) as bookmarks in the converted PDF document. As per Microsoft Word behavior, either Word document headings or bookmarks can be exported as PDF bookmarks. By default, DocIO preserves Word document bookmarks as PDF bookmarks in converted PDF document. The following code sample shows how to preserve Word document headings as bookmarks in the converted PDF document. @@ -291,6 +291,8 @@ wordDocument.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Export-Word-headings-into-PDF). +### Preserve headings and bookmarks + The following code sample shows how to preserve both Word document headings and Bookmarks as PDF bookmarks in the converted PDF document. {% tabs %} @@ -352,7 +354,7 @@ wordDocument.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Export-Word-bookmarks-into-PDF). -## Word document form field to PDF form field. +## Word document form field to PDF form field This setting allows you to determine whether to **preserve Word document form fields** (Text form field, Checkbox form field and Drop-down form field) as PDF form fields in the converted PDF document. This features helps in **creating fillable PDF forms from Word document**. @@ -417,10 +419,12 @@ wordDocument.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Create-fillable-PDF-from-Word). -## Image quality +## Image quality This setting allows you to determine the **quality of the charts and JPEG images** in the converted PDF document. +N> Image quality customization is supported only in Windows Forms, WPF, ASP.NET, and ASP.NET MVC platforms. + The following code sample shows how to customize the image quality of charts and JPEG images in the converted PDF document. {% tabs %} @@ -483,6 +487,8 @@ This setting allows you to regenerate the nested EMF images present in the Word This property is recommended to resolve the scaling problem of nested metafile images by regenerating the nested metafile images present in the Word document. +N> Recreate Nested Metafile is supported only in Windows Forms, WPF, ASP.NET, and ASP.NET MVC platforms. It is also supported in .NET Core 3.0 when using the DocToPDFConverter assembly instead of DocIORenderer. + The following code sample shows how to use this property to regenerate the nested EMF images present in the Word document during PDF conversion. {% tabs %} @@ -529,7 +535,7 @@ wordDocument.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Recreate-nested-metafile). -## Identical image optimization +## Identical image optimization This setting **reduces the Main Memory usage** in Word to PDF conversion by reusing the identical images. @@ -822,7 +828,8 @@ You can download a complete working sample from [GitHub](https://github.com/Sync Essential® DocIO now allows hyphenating text in a Word document while converting it to PDF format based on the given language dictionaries. These dictionaries prescribe where words of a specific language can be hyphenated. Use the dictionary files as OpenOffice format dictionary. N> 1. If automatic hyphenation is not enabled in the Word document, you can enable it by using [WordDocument.Properties.Hyphenation.AutoHyphenation](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Hyphenation.html#Syncfusion_DocIO_DLS_Hyphenation_AutoHyphenation) of DocIO. -N> 2. After converting Word documents to PDF, release any dictionary file streams to avoid memory leaks. Call [Hyphenator.UnloadDictionaries()](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Hyphenator.html#Syncfusion_DocIO_DLS_Hyphenator_UnloadDictionaries) to free hyphenation resources and optimize performance. +N> 2. You can obtain OpenOffice hyphenation dictionary files (.dic) from the [OpenOffice dictionary repository](https://github.com/LibreOffice/dictionaries). +N> 3. After converting Word documents to PDF, release any dictionary file streams to avoid memory leaks. Call [Hyphenator.UnloadDictionaries()](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Hyphenator.html#Syncfusion_DocIO_DLS_Hyphenator_UnloadDictionaries) to free hyphenation resources and optimize performance. The following code sample shows how to hyphenate text in a Word document while converting it to PDF format. @@ -838,13 +845,14 @@ DocIORenderer renderer = new DocIORenderer(); FileStream dictionaryStream = new FileStream("hyphen_en_US.dic", FileMode.Open); //Adds the hyphenation dictionary of the specified language Hyphenator.Dictionaries.Add("en-US", dictionaryStream); +dictionaryStream.Dispose(); //Converts Word document into PDF document PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument); //Closes the instance of Word document object wordDocument.Close(); //Releases the resources occupied by DocIORenderer instance renderer.Dispose(); -//Saves the PDF file +//Saves the PDF file MemoryStream outputStream = new MemoryStream(); pdfDocument.Save(outputStream); //Closes the instance of PDF document object @@ -864,7 +872,7 @@ FileStream dictionaryStream = new FileStream("hyphen_en_US.dic", FileMode.Open, Hyphenator.Dictionaries.Add("en-US", dictionaryStream); //Converts Word document into PDF document PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument); -//Saves the PDF file +//Saves the PDF file pdfDocument.Save("WordtoPDF.pdf"); //Closes the instance of document objects wordDocument.Close(); @@ -879,12 +887,12 @@ wordDocument.ChartToImageConverter = New ChartToImageConverter() 'Creates an instance of the DocToPDFConverter Dim converter As New DocToPDFConverter() 'Adds the hyphenation dictionary of the specified language -Dim dictionaryStream As New FileStream("hyphen_en_US .dic", mode:=FileMode.Open) +Dim dictionaryStream As New FileStream("hyphen_en_US.dic", mode:=FileMode.Open) 'Adds the hyphenation dictionary of the specified language Hyphenator.Dictionaries.Add("en-US", dictionaryStream) 'Converts Word document into PDF document Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument) -'Saves the PDF file +'Saves the PDF file pdfDocument.Save("WordtoPDF.pdf") 'Closes the instance of document objects pdfDocument.Close(True) @@ -897,6 +905,8 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Track changes in Word-to-PDF conversion +### Preserve track changes + The following code sample shows how to **preserve revision marks in a generated PDF** when converting Word documents with tracked changes or revisions. {% tabs %} @@ -944,7 +954,7 @@ pdfDocument.Close(); {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Loads an existing Word document Dim wordDocument As New WordDocument("Template.docx", FormatType.Docx) -'Sets revision types to preserve track changes in when converting to PDF conversion. +'Sets revision types to preserve track changes when converting to PDF. wordDocument.RevisionOptions.ShowMarkup = RevisionType.Deletions Or RevisionType.Formatting Or RevisionType.Insertions 'Creates an instance of the DocToPDFConverter @@ -967,7 +977,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ### Change the Track Changes Color -You can customize how track changes markup appears in a generated PDF when converting Word documents into PDF. The following code sample shows how to customize revision marks colors. +You can customize the track changes markup that appears in a generated PDF when converting Word documents into PDF. The following code sample shows how to customize revision marks colors. {% tabs %} @@ -1222,6 +1232,8 @@ You can download a complete working sample from [GitHub](https://github.com/Sync This setting allows you to preserve Ole Equation as bitmap image in the converted PDF document. +N> Preserving Ole Equation as bitmap image is supported only in Windows Forms, WPF, ASP.NET, and ASP.NET MVC platforms. + The following code sample shows how to preserve Ole Equation as bitmap image in the converted PDF document. {% tabs %} @@ -1268,11 +1280,11 @@ wordDocument.Close() You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Ole-Equation-as-bitmap). -## Restrict all permission in a PDF document +## Restrict all permissions in a PDF document -You can restrict all the permission in a PDF document using [PdfPermissionsFlags](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfPermissionsFlags.html). +You can restrict all permissions in a PDF document using [PdfPermissionsFlags](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfPermissionsFlags.html). -The below code example shows how to restrict Copying and Printing permission of the PDF document. +The code example below shows how to restrict Copying and Printing permission of the PDF document. {% tabs %} @@ -1292,13 +1304,13 @@ PdfSecurity security = pdfDocument.Security; security.KeySize = PdfEncryptionKeySize.Key256Bit; security.Algorithm = Syncfusion.Pdf.Security.PdfEncryptionAlgorithm.AES; security.OwnerPassword = "syncfusion"; -//It restrict printing and copying of PDF document +//It restricts printing and copying of PDF document security.Permissions = ~(PdfPermissionsFlags.CopyContent | PdfPermissionsFlags.Print); //Releases all resources used by the Word document and DocIO Renderer objects render.Dispose(); wordDocument.Dispose(); //Saves the PDF file -FileStream outputFile = new FileStream("Output.docx", FileMode.OpenOrCreate, FileAccess.ReadWrite); +FileStream outputFile = new FileStream("Output.pdf", FileMode.OpenOrCreate, FileAccess.ReadWrite); pdfDocument.Save(outputFile); //Closes the instance of PDF document object pdfDocument.Close(); @@ -1307,7 +1319,7 @@ outputFile.Dispose(); {% highlight c# tabtitle="C# [Windows-specific]" %} //Creates an instance of WordDocument class -WordDocument document = new WordDocument("Template.docx"); +WordDocument document = new WordDocument("Template.docx", FormatType.Docx); //Creates an instance of the DocToPDFConverter DocToPDFConverter converter = new DocToPDFConverter(); //Converts Word document into PDF document @@ -1328,7 +1340,7 @@ document.Close(); {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} 'Creates an instance of WordDocument class -Dim document As WordDocument = New WordDocument("Template.docx") +Dim document As WordDocument = New WordDocument("Template.docx", FormatType.Docx) 'Creates an instance of the DocToPDFConverter Dim converter As DocToPDFConverter = New DocToPDFConverter() 'Converts Word document into PDF document @@ -1339,7 +1351,7 @@ Dim security As PdfSecurity = pdfDocument.Security security.KeySize = PdfEncryptionKeySize.Key256Bit security.Algorithm = Syncfusion.Pdf.Security.PdfEncryptionAlgorithm.AES security.OwnerPassword = "syncfusion" -'It restrict printing and copying of PDF document +'It restricts printing and copying of PDF document security.Permissions = Not (PdfPermissionsFlags.CopyContent Or PdfPermissionsFlags.Print) pdfDocument.Save("Output.pdf") pdfDocument.Close() diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md index cac8c50ba4..2c25e89ba0 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md @@ -1,13 +1,13 @@ --- title: FAQ about multithreading in Word to PDF | DocIO | Syncfusion -description: Learn about the FAQs regarding the support of multithreading in Word to PDF conversion using the .NET Word (DocIO) library. +description: Learn about multithreading and thread-safety support in Word to PDF conversion using the .NET Word (DocIO) library. platform: document-processing control: DocIO documentation: UG --- -# Frequently asked questions about multithreading in Word to PDF +# Multithreading in Word to PDF conversion -The frequently asked questions regarding multithreading and thread-safety support in Word to PDF conversion are listed below. +This page covers multithreading and thread-safety support in Word to PDF conversion. ## Does the Word library support multithreading and thread-safety for Word to PDF conversion? @@ -20,38 +20,46 @@ The following code example illustrates how to use multithreading to convert mult {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} +using System; +using System.IO; +using System.Threading.Tasks; +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using Syncfusion.DocIORenderer; +using Syncfusion.Pdf; + class MultiThreading { - //Indicates the number of threads to be create. + // Indicates the number of threads to be created. private const int TaskCount = 1000; public static async Task Main() { - //Create an array of tasks based on the TaskCount. + // Create an array of tasks based on the TaskCount. Task[] tasks = new Task[TaskCount]; for (int i = 0; i < TaskCount; i++) { tasks[i] = Task.Run(() => ConvertWordToPDF()); } - //Ensure all tasks complete by waiting on each task. + // Ensure all tasks complete by waiting on each task. await Task.WhenAll(tasks); } - //Convert a Word document to PDF using multi-threading. + // Convert a Word document to PDF using multi-threading. static void ConvertWordToPDF() { using (FileStream inputStream = new FileStream("Input.docx", FileMode.Open, FileAccess.Read)) { - //Load an existing Word document. + // Load an existing Word document. using (WordDocument document = new WordDocument(inputStream, FormatType.Docx)) { - //Create an instance of DocIORenderer. + // Create an instance of DocIORenderer. using (DocIORenderer renderer = new DocIORenderer()) { - //Convert Word document to PDF. + // Convert Word document to PDF. using (PdfDocument pdfDocument = renderer.ConvertToPDF(document)) { - //Save the PDF document. - using (FileStream outputFileStream = new FileStream("Output" + Guid.NewGuid().ToString() +".pdf", FileMode.Create, FileAccess.Write)) + // Save the PDF document. + using (FileStream outputFileStream = new FileStream("Output" + Guid.NewGuid().ToString() + ".pdf", FileMode.Create, FileAccess.Write)) { pdfDocument.Save(outputFileStream); } @@ -64,31 +72,39 @@ class MultiThreading {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} +using System; +using System.IO; +using System.Threading.Tasks; +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using Syncfusion.DocToPDFConverter; +using Syncfusion.Pdf; + class MultiThreading { - //Indicates the number of threads to be create. + // Indicates the number of threads to be created. private const int TaskCount = 1000; public static async Task Main() { - //Create an array of tasks based on the TaskCount. + // Create an array of tasks based on the TaskCount. Task[] tasks = new Task[TaskCount]; for (int i = 0; i < TaskCount; i++) { tasks[i] = Task.Run(() => ConvertWordToPDF()); } - //Ensure all tasks complete by waiting on each task. + // Ensure all tasks complete by waiting on each task. await Task.WhenAll(tasks); } - //Convert a Word document to PDF using multi-threading. + // Convert a Word document to PDF using multi-threading. static void ConvertWordToPDF() { using (FileStream inputStream = new FileStream("Input.docx", FileMode.Open, FileAccess.Read)) { - //Load an existing Word document. + // Load an existing Word document. using (WordDocument document = new WordDocument(inputStream, FormatType.Docx)) { - //Create an instance of DocToPDFConverter. + // Create an instance of DocToPDFConverter. using (DocToPDFConverter converter = new DocToPDFConverter()) { //Convert Word document to PDF. @@ -106,29 +122,37 @@ class MultiThreading {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} +Imports System +Imports System.IO +Imports System.Threading.Tasks +Imports Syncfusion.DocIO +Imports Syncfusion.DocIO.DLS +Imports Syncfusion.DocToPDFConverter +Imports Syncfusion.Pdf + Module MultiThreading - 'Indicates the number of threads to be create. + ' Indicates the number of threads to be created. Private Const TaskCount As Integer = 1000 Public Sub Main() - 'Create an array of tasks based on the TaskCount. + ' Create an array of tasks based on the TaskCount. Dim tasks(TaskCount - 1) As Task For i As Integer = 0 To TaskCount - 1 tasks(i) = Task.Run(Sub() ConvertWordToPDF()) Next - 'Ensure all tasks complete by waiting on each task. + ' Ensure all tasks complete by waiting on each task. Task.WhenAll(tasks).Wait() End Sub - 'Convert a Word document to PDF using multi-threading. + ' Convert a Word document to PDF using multi-threading. Private Sub ConvertWordToPDF() Using inputStream As New FileStream("Input.docx", FileMode.Open, FileAccess.Read, FileShare.Read) - 'Load an existing Word document. + ' Load an existing Word document. Using document As New WordDocument(inputStream, FormatType.Docx) - 'Create an instance of DocToPDFConverter. + ' Create an instance of DocToPDFConverter. Using converter As New DocToPDFConverter() - 'Convert Word document to PDF. + ' Convert Word document to PDF. Using pdfDocument As PdfDocument = converter.ConvertToPDF(document) - 'Save the PDF document. + ' Save the PDF document. Using outputFileStream As New FileStream("Output" & Guid.NewGuid().ToString() & ".pdf", FileMode.Create, FileAccess.Write) pdfDocument.Save(outputFileStream) End Using @@ -144,41 +168,51 @@ End Module You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Multithreading-using-tasks). +> **Note:** When running many concurrent tasks, wrap the `Task.WhenAll` call in a `try`/`catch` to handle `AggregateException` and inspect individual task exceptions as needed. + ### Multithreading Word to PDF using parallel process -The following code example illustrates how to use a parallel for loop to process multiple tasks concurrently, converting Word documents to PDF using multithreading in C#. +The following code example illustrates how to use a parallel `for` loop to process multiple tasks concurrently, converting Word documents to PDF using multithreading in C#. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} +using System; +using System.IO; +using System.Threading.Tasks; +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using Syncfusion.DocIORenderer; +using Syncfusion.Pdf; + class MultiThreading { static void Main(string[] args) { - //Indicates the number of threads to be create. + // Indicates the number of threads to be created. int limit = 5; Console.WriteLine("Parallel For Loop"); Parallel.For(0, limit, count => { Console.WriteLine("Task {0} started", count); - //Convert multiple Word document, one document on each thread. + // Convert multiple Word documents, one document on each thread. ConvertWordToPDF(count); Console.WriteLine("Task {0} is done", count); }); } - //Convert a Word document to PDF using multi-threading. + // Convert a Word document to PDF using multi-threading. static void ConvertWordToPDF(int count) { using (FileStream inputStream = new FileStream("Input.docx", FileMode.Open, FileAccess.Read)) { - //Load an existing Word document. + // Load an existing Word document. using (WordDocument document = new WordDocument(inputStream, FormatType.Docx)) { - //Create an instance of DocIORenderer. + // Create an instance of DocIORenderer. using (DocIORenderer renderer = new DocIORenderer()) { - //Convert Word document to PDF. + // Convert Word document to PDF. PdfDocument pdfDocument = renderer.ConvertToPDF(document); //Save the PDF document. using (FileStream outputFileStream = new FileStream("Output" + count + ".pdf", FileMode.Create, FileAccess.Write)) @@ -195,37 +229,45 @@ class MultiThreading {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} +using System; +using System.IO; +using System.Threading.Tasks; +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using Syncfusion.DocToPDFConverter; +using Syncfusion.Pdf; + class MultiThreading { static void Main(string[] args) { - //Indicates the number of threads to be create. + // Indicates the number of threads to be created. int limit = 5; Console.WriteLine("Parallel For Loop"); Parallel.For(0, limit, count => { Console.WriteLine("Task {0} started", count); - //Convert multiple Word document, one document on each thread. + // Convert multiple Word documents, one document on each thread. ConvertWordToPDF(count); Console.WriteLine("Task {0} is done", count); }); } - //Convert a Word document to PDF using multi-threading. + // Convert a Word document to PDF using multi-threading. static void ConvertWordToPDF(int count) { using (FileStream inputStream = new FileStream("Input.docx", FileMode.Open, FileAccess.Read)) { - //Load an existing Word document. + // Load an existing Word document. using (WordDocument document = new WordDocument(inputStream, FormatType.Docx)) { - //Create an instance of DocToPDFConverter. + // Create an instance of DocToPDFConverter. using (DocToPDFConverter converter = new DocToPDFConverter()) { - //Convert Word document to PDF. + // Convert Word document to PDF. using (PdfDocument pdfDocument = converter.ConvertToPDF(document)) { - //Save the PDF document. + // Save the PDF document. using (FileStream outputFileStream = new FileStream("Output" + count + ".pdf", FileMode.Create, FileAccess.Write)) { pdfDocument.Save(outputFileStream); @@ -239,30 +281,37 @@ class MultiThreading {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} +Imports System +Imports System.IO +Imports System.Threading.Tasks +Imports Syncfusion.DocIO +Imports Syncfusion.DocIO.DLS +Imports Syncfusion.DocToPDFConverter +Imports Syncfusion.Pdf + Module MultiThreading Public Sub Main(args As String()) - ' Indicates the number of threads to be create. + ' Indicates the number of threads to be created. Dim limit As Integer = 5 Console.WriteLine("Parallel For Loop") - ' Parallel For Loop Parallel.For(0, limit, Sub(count) Console.WriteLine("Task {0} started", count) - 'Convert multiple Word document, one document on each thread. + ' Convert multiple Word documents, one document on each thread. ConvertWordToPDF(count) Console.WriteLine("Task {0} is done", count) End Sub) End Sub - ' Convert multiple Word document to PDF using multi-threading. + ' Convert multiple Word documents to PDF using multi-threading. Private Sub ConvertWordToPDF(count As Integer) - Using inputStream As New FileStream("Input.docx", FileMode.Open, FileAccess.Read) - 'Load an existing Word document. + Using inputStream As New FileStream("Input.docx", FileMode.Open, FileAccess.Read, FileShare.Read) + ' Load an existing Word document. Using document As New WordDocument(inputStream, FormatType.Docx) - 'Create an instance of DocToPDFConverter. + ' Create an instance of DocToPDFConverter. Using converter As New DocToPDFConverter() - 'Convert Word document to PDF. + ' Convert Word document to PDF. Using pdfDocument As PdfDocument = converter.ConvertToPDF(document) - 'Save the PDF document. + ' Save the PDF document. Using outputFileStream As New FileStream("Output" & count.ToString() & ".pdf", FileMode.Create, FileAccess.Write) pdfDocument.Save(outputFileStream) End Using @@ -276,4 +325,10 @@ End Module {% endtabs %} -You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Multithreading-using-parallel-process). \ No newline at end of file +You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Multithreading-using-parallel-process). + +## See also + +* [Word to PDF conversion overview](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/word-to-pdf) +* [Assemblies required for Word to PDF](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/assemblies-required-word-to-pdf) +* [NuGet packages required for Word to PDF](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/nuget-packages-required-word-to-pdf) \ No newline at end of file diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md index c60686c0cc..3c3fad4049 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md @@ -8,15 +8,17 @@ documentation: UG # Frequently Asked Questions -The frequently asked questions about Word to PDF conversion in Essential® DocIO are listed below. +The frequently asked questions about Word to PDF conversion in Essential® DocIO are listed below. This page addresses common questions on chart conversion, PDF conformance, font handling, form fields, track changes, and platform-specific issues. -## Could not find Syncfusion.OfficeChartToImageConverter assembly in .NET 3.5 Framework, does it mean there is no support for chart conversion in this Framework? +## Could not find Syncfusion.OfficeChartToImageConverter assembly in the .NET 3.5 Framework. Does it mean there is no support for chart conversion in this framework? -Yes, OfficeChartToImageConverter assembly is not supported in .NET 3.5 Framework and it is available in .NET 4.0 Framework. +Yes, the OfficeChartToImageConverter assembly is not supported in the .NET 3.5 Framework. It is available in the .NET 4.0 Framework and later versions. To use chart conversion, upgrade your project to .NET 4.0 or higher. For the list of required assemblies, refer to the [Assemblies required for Word to PDF conversion](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/assemblies-required-word-to-pdf) documentation. ## Is it possible to convert 3D charts to PDF? -Current version of the DocIO library does not provide support for converting 3D charts to PDF format. +The current version of the DocIO library does not provide support for converting 3D charts to PDF format. + +**Workaround:** As an alternative, you can render the 3D chart as an image using the [OfficeChartToImageConverter](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-charts) and then insert that image into the Word document before conversion. For more information, refer to the [Working with Charts](https://help.syncfusion.com/document-processing/word/word-library/net/working-with-charts) documentation. ## Is it possible to specify PDF conformance level in Word to PDF conversion? @@ -31,11 +33,20 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## How to validate the PDF conformance level in a DocIO-converted PDF? -PDF conformance can be verified using tools like **Adobe Acrobat Pro, VeraPDF, Xodo Validator, and PDFCreator Validator**. These tools check if the PDF meets compliance standards. DocIO-generated PDFs can be validated using any of these tools to ensure compliance with the required standards. +PDF conformance can be verified using tools like Adobe Acrobat Pro, VeraPDF, Xodo Validator, and PDFCreator Validator. These tools check if the PDF meets compliance standards. DocIO-generated PDFs can be validated using any of these tools to ensure compliance with the required standards. + +**Steps to validate:** +1. Open the converted PDF in any of the validators listed above (for example, VeraPDF). +2. Select the PDF conformance profile (such as PDF/A-1b, PDF/A-2b, or PDF/UA) you want to verify. +3. Run the validation and review the report for any conformance issues. + +For more details on the supported conformance levels in DocIO, refer to [PDF Conformance](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-pdf-conformance). ## Is it possible to preserve track changes revisions in a Word document as comments in a PDF using DocIO? -When a Word document with revisions is converted to a PDF using Microsoft Word, the revisions are preserved as balloons. So, it is not possible to preserve revisions in a Word document as comments in a PDF. Using DocIO, revisions can be displayed as balloons in the converted PDF by enabling the [ShowMarkup](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.RevisionOptions.html#Syncfusion_DocIO_DLS_RevisionOptions_ShowMarkup) property. Refer to the [documentation](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#show-or-hide-revisions-in-balloons) and [GitHub sample](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Show-or-hide-revisions-in-balloons) for implementation. +No. When a Word document with revisions is converted to a PDF using Microsoft Word, the revisions are preserved as balloons (revision marks) rather than as comments. Likewise, DocIO cannot convert track changes revisions into PDF comments. + +**What DocIO supports:** You can display the revisions as balloons in the converted PDF by enabling the [ShowMarkup](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.RevisionOptions.html#Syncfusion_DocIO_DLS_RevisionOptions_ShowMarkup) property. Refer to the [documentation](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#show-or-hide-revisions-in-balloons) and [GitHub sample](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Show-or-hide-revisions-in-balloons) for implementation. ## Why does a Word document converted to PDF on one device not display correctly when converted on another device? @@ -45,9 +56,11 @@ For more details with implementation, refer to the [documentation](https://help. ## Why are Chinese characters missing or blank in the PDF after Word-to-PDF conversion? -Chinese characters may not appear in the converted PDF if the original Word document uses fonts like **Calibri**, which do not support Chinese glyphs in PDFs. +Chinese characters may not appear in the converted PDF if the original Word document uses fonts like Calibri, which do not support Chinese glyphs in PDFs. + +To render Chinese and other Unicode characters correctly, we recommend using the *Arial Unicode MS* font in your Word document. If Arial Unicode MS is not installed on the machine during conversion, the characters will not display properly in the output PDF. To resolve this, install the *Arial Unicode MS* font on the system before converting the document. -To render Chinese and other Unicode characters correctly, we **recommend using the Arial Unicode MS font in your Word document**. If Arial Unicode MS is not installed on the machine during conversion, the characters will not display properly in the output PDF. To resolve this, **install the Arial Unicode MS font** on the system before converting the document. +For more details on configuring fallback fonts for missing glyphs, refer to the [Fallback fonts](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/fallback-fonts-word-to-pdf) documentation. ## What is the difference between font substitution and fallback fonts in Word to PDF conversion? @@ -66,7 +79,7 @@ To render Chinese and other Unicode characters correctly, we **recommend using t Replaces an entirely missing font. - When It’s Used + When It's Used A font is present but lacks specific character glyphs. The required font is not installed on the system. @@ -99,7 +112,9 @@ This exception typically occurs due to version mismatches between SkiaSharp and ## Why does System.TypeInitializationException occur during Word to PDF or image conversion in Linux using Syncfusion DocIO? -This error usually occurs due to an incompatible GLIBC version on the Linux system. SkiaSharp, used by DocIO for rendering, requires a minimum GLIBC version to function correctly. For example, SkiaSharp version 3.119.1 requires at least GLIBC version 2.29, which is not available in older Linux distributions like Debian 10. If a lower version is present, the conversion may fail with errors such as GLIBC_2.29 not found. To resolve this, ensure the operating system includes the required GLIBC version for the SkiaSharp version being used, or upgrade to a newer Linux distribution. +This error usually occurs due to an incompatible GLIBC version on the Linux system. SkiaSharp, used by DocIO for rendering, requires a minimum GLIBC version to function correctly. For example, SkiaSharp version 3.119.1 requires at least GLIBC version 2.29, which is not available in older Linux distributions like Debian 10. If a lower version is present, the conversion may fail with an error such as `GLIBC_2.29 not found`. + +**Resolution:** Ensure the operating system includes the required GLIBC version for the SkiaSharp version being used, or upgrade to a newer Linux distribution. For the list of supported Linux distributions, refer to the [Convert Word document to PDF in Linux](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-linux) documentation. ## Is it possible to substitute fonts in a Word document? diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-linux-docker.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-linux-docker.md index aa39c58f1a..dbe2607c9a 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-linux-docker.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-linux-docker.md @@ -17,7 +17,7 @@ The following prerequisites are required before you begin: * [.NET SDK 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) * [Docker Desktop](https://www.docker.com/products/docker-desktop/) (Windows/macOS) or Docker Engine (Linux) installed and running * A valid Syncfusion® license key. Refer to this [licensing guide](https://help.syncfusion.com/common/essential-studio/licensing/overview) to generate and register a key. -* [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) with the **.NET desktop development** and **.NET Core cross-platform development** workloads (for the "Add Docker Support" steps in Visual Studio) +* Visual Studio 2022 or laterwith the **.NET desktop development** and **.NET Core cross-platform development** workloads (for the "Add Docker Support" steps in Visual Studio) ## Steps to convert a Word document to PDF in Linux Docker diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf.md index b9de21ded9..5d91b25548 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf.md @@ -8,10 +8,20 @@ documentation: UG # Convert Word to PDF in .NET using Syncfusion® Word (DocIO) library -The [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) allows you to convert Word document to PDF within a few lines of code in .NET applications and also it does not require Adobe and Microsoft Word application to be installed in the machine. Using this, you can create an input Word document from scratch or load an existing Word document and then easily convert to PDF. +The [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) allows you to convert a Word document to PDF within a few lines of code in .NET applications. It does not require Adobe Acrobat or Microsoft Word to be installed on the machine. Using this library, you can create a Word document from scratch or load an existing Word document and then easily convert it to PDF. The [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) to PDF converter offers high versatility and seamless performance across various .NET platforms, including [Windows Forms](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-window-forms), [WPF](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-wpf), [ASP.NET](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net), [ASP.NET MVC](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-mvc), [ASP.NET Core](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-core), [Blazor](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-blazor), [Xamarin](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-xamarin), [WinUI](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-winui), [.NET MAUI](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-maui). Also, in different environments like [Azure](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-azure), [AWS](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-aws), [Google Cloud](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-google-cloud-platform), [Linux](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-linux), [Docker](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-linux-docker), and [macOS](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-mac). +## Assemblies and NuGet packages required + +Refer to the following links for the assemblies and NuGet packages required based on your platform to convert a Word document to PDF. + +* [Word to PDF conversion assemblies](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/assemblies-required-word-to-pdf) +* [Word to PDF conversion NuGet packages](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/nuget-packages-required-word-to-pdf) + +For a quick walkthrough on converting a Word document to a PDF, check out this video: +{% youtube "https://www.youtube.com/watch?v=8QdevnBxgHk" %} + ## Key Features * Ability to [embed fonts](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#embedding-fonts) within the PDF for consistent display. @@ -26,19 +36,14 @@ The [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library * Ability to use custom dictionaries for [text hyphenation](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#hyphenation-in-word-to-pdf-conversion) in the converted PDF. * Support for preserving revision marks of [tracked changes](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#track-changes-in-word-to-pdf-conversion) in the converted PDF. * Option to toggle between preserving or excluding [comments](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#comments-in-word-to-pdf-conversion) during Word to PDF conversions. -* Option to [show warnings for any unsupported elements](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf#show-warning-for-unsupported-elements) during conversion. +* Option to [show warnings for any unsupported elements](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/unsupported-elements-word-to-pdf#show-warning-for-unsupported-elements) during conversion. -## Assemblies and NuGet packages required - -Refer to the following links for assemblies required based on platforms to convert the Word document to PDF. - -* [Word to PDF conversion assemblies](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/assemblies-required-word-to-pdf) -* [Word to PDF conversion NuGet packages](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/nuget-packages-required-word-to-pdf) +## Convert Word to PDF -To quickly start converting a Word document to a PDF, please check out this video: -{% youtube "https://www.youtube.com/watch?v=8QdevnBxgHk" %} +The following prerequisites are required before running the code samples in this section: -## Convert Word to PDF +* Create a new .NET console, class library, or web application targeting a supported version of .NET Framework, .NET Core, or .NET (5+). +* Install the required Syncfusion NuGet packages for your target platform. For details, see [Word to PDF conversion NuGet packages](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/nuget-packages-required-word-to-pdf). The following namespaces are required to compile the code: @@ -47,6 +52,7 @@ N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-plat {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} +using System.IO; using Syncfusion.DocIO; using Syncfusion.DocIO.DLS; using Syncfusion.DocIORenderer; @@ -143,9 +149,9 @@ You can download a complete working sample from [GitHub](https://github.com/Sync T> For troubleshooting issues in the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO), refer [this](https://support.syncfusion.com/kb/article/16012/troubleshooting-guide-for-syncfusion-word-docio-library-issues?isInternalRefresh=False) article that provides comprehensive guidance on resolving common problems. -N> 1. For .NET Framework, creating an instance of the [ChartToImageConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.OfficeChartToImageConverter.ChartToImageConverter.html) class is mandatory to convert the charts present in the Word to PDF. Otherwise, the charts are not preserved in the converted PDF. Whereas this is not necessary for .NET Core, as ChartToImageConverter is initialized internally in Syncfusion.DocIORenderer.Portable assembly. -N> 2. Total number of pages in the converted PDF may vary based on unsupported elements in the input Word document. -N> 3. "DocIO supports Word to PDF conversion in UWP application using DocIORenderer." For further information, please refer [here](https://support.syncfusion.com/kb/article/8902/how-to-convert-word-document-to-pdf-in-uwp) +N> 1. For .NET Framework, creating an instance of the [ChartToImageConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.OfficeChartToImageConverter.ChartToImageConverter.html) class is mandatory to convert the charts present in the Word to PDF. Otherwise, the charts are not preserved in the converted PDF. Whereas this is not necessary for .NET (Core), as ChartToImageConverter is initialized internally in the Syncfusion.DocIORenderer.Portable assembly. +N> 2. Total number of pages in the converted PDF may vary based on unsupported elements in the input Word document. For more information, refer to the [Limitations in Word to PDF Conversion](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/unsupported-elements-word-to-pdf) page. +N> 3. DocIO supports Word to PDF conversion in UWP applications using DocIORenderer. For further information, refer [here](https://support.syncfusion.com/kb/article/8902/how-to-convert-word-document-to-pdf-in-uwp). N> 4. Failing to dispose of resources can lead to memory leaks, high memory usage, and performance issues, potentially causing the application to crash. Using **Dispose()** or a **using** statement ensures efficient memory management and keeps the app stable. ## Supported File formats @@ -162,59 +168,59 @@ N> To see limitations and unsupported features in Word to PDF conversion, refer ## Word to PDF conversion in Linux OS -In Linux OS, you can perform the Word to PDF conversion using .NET Core (Targeting .netcoreapp) application. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-linux). +In Linux OS, you can perform the Word to PDF conversion using a .NET Core application (targeting .NET 8 or later). For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-linux). -**Frequently Asked Questions** +## Frequently Asked Questions * [How to copy necessary fonts to Linux containers?](https://help.syncfusion.com/document-processing/word/word-library/net/faq#how-to-copy-necessary-fonts-to-linux-containers) * [How to set culture / locale in Docker containers (Windows & Linux containers)?](https://help.syncfusion.com/document-processing/word/word-library/net/faq#how-to-set-culturelocale-in-docker-containers-windows-and-linux-containers) * [How to copy necessary Microsoft compatible fonts to Linux?](https://help.syncfusion.com/document-processing/word/word-library/net/faq#how-to-copy-necessary-microsoft-compatible-fonts-to-linux) -* [How to resolve LibSkiaSharp not found Exception?](https://help.syncfusion.com/document-processing/word/word-library/net/faq#how-to-resolve-libskiasharp-not-found-exception) +* [How to resolve LibSkiaSharp not found exception?](https://help.syncfusion.com/document-processing/word/word-library/net/faq#how-to-resolve-libskiasharp-not-found-exception) ## Customization settings -The Essential® DocIO provides settings while performing Word to PDF conversion mentioned below, +Essential® DocIO provides the following settings to customize Word to PDF conversion. Use these options to control font embedding, accessibility, structure preservation, image handling, conformance, and security in the output PDF. ### Embedding fonts -You can customize the TrueType fonts embedding in two ways as follows: +You can customize the TrueType font embedding in two ways: -* [Embed Subset Fonts](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#embed-subset-fonts). -* [Embed Complete Fonts](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#embed-complete-fonts). +* [Embed subset fonts](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#embed-subset-fonts). +* [Embed complete fonts](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#embed-complete-fonts). ### Accessible PDF document -This setting allows you to determine whether to preserve document structured tags in the converted **PDF document for accessibility (508 compliance) support**. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#accessible-pdf-document). +This setting allows you to determine whether to preserve document structured tags in the converted **PDF document for accessibility (Section 508 compliance) support**. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#accessible-pdf-document). ### Word document headings to PDF bookmarks -This setting allows you to determine whether to **preserve Word document headings** (i.e., paragraph with heading style and outline level) as bookmarks in the converted PDF document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#word-document-headings-to-pdf-bookmarks). +This setting allows you to determine whether to **preserve Word document headings** (i.e., paragraphs with heading style and outline level) as bookmarks in the converted PDF document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#word-document-headings-to-pdf-bookmarks). -### Word document form field to PDF form field. +### Word document form field to PDF form field -This setting allows you to determine whether to **preserve Word document form fields** (Text form field, Checkbox form field and Drop-down form field) as PDF form fields in the converted PDF document. This features helps in creating fillable PDF forms from Word document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#word-document-form-field-to-pdf-form-field). +This setting allows you to determine whether to **preserve Word document form fields** (text form field, checkbox form field, and drop-down form field) as PDF form fields in the converted PDF document. This feature helps in creating fillable PDF forms from a Word document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#word-document-form-field-to-pdf-form-field). -### Image quality +### Image quality This setting allows you to determine the **quality of the charts and JPEG images** in the converted PDF document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#image-quality). -### Recreate Nested Metafile +### Recreate nested metafile This setting allows you to regenerate the nested EMF images present in the Word document during PDF conversion. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#recreate-nested-metafile). -### Identical image optimization +### Identical image optimization -This setting **reduces the Main Memory usage** in Word to PDF conversion by reusing the identical images. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#identical-image-optimization). +This setting **reduces the main memory usage** in Word to PDF conversion by reusing identical images. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#identical-image-optimization). -### PDF Conformance Level +### PDF conformance level This setting allows you to set the PDF conformance level. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#pdf-conformance-level). -### Enable Alternate Chunks +### Enable alternate chunks -In the Word document, another Word documents are embedded in it and referred as AltChunks. This setting allows you to include the alternate chunks while converting Word to PDF conversion. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#enable-alternate-chunks). +In the Word document, other Word documents are embedded and referred to as AltChunks. This setting allows you to include the alternate chunks while converting Word to PDF. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#enable-alternate-chunks). -### Complex Script Text +### Complex script text This setting allows you to preserve the **complex script text** in the converted PDF document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#complex-script-text). @@ -228,23 +234,23 @@ You can **preserve revision marks in a generated PDF document** when converting ### Comments in Word-to-PDF conversion -You can **preserve comments balloon in a generated PDF** when converting Word documents with comments. Also you can customize how comments balloon color appears in a generated PDF. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#comments-in-word-to-pdf-conversion). +You can **preserve comment balloons in a generated PDF** when converting Word documents with comments. You can also customize how the comment balloon color appears in a generated PDF. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#comments-in-word-to-pdf-conversion). -### Preserve Ole Equation as bitmap image +### Preserve OLE equation as bitmap image -You can preserve Ole Equation as bitmap image in the converted PDF document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#preserve-ole-equation-as-bitmap-image). +You can preserve an OLE equation as a bitmap image in the converted PDF document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#preserve-ole-equation-as-bitmap-image). ### Restrict all permission in a PDF document -You can restrict all the permission in a PDF document using [PdfPermissionsFlags](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfPermissionsFlags.html). For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#restrict-all-permission-in-a-pdf-document). +You can restrict all the permissions in a PDF document using [PdfPermissionsFlags](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfPermissionsFlags.html). For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#restrict-all-permission-in-a-pdf-document). -### Apply Matte to Transparent Images +### Apply matte to transparent images This setting allows you to determine whether to **apply a matte color to transparent images** during Word to PDF conversion, ensuring they render cleanly without unwanted borders or artifacts in the final PDF. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#apply-matte-to-transparent-images). -## Font Substitution +## Font substitution -When the necessary fonts used in the Word document has not been installed in the production machine, then Essential® DocIO uses the ”Microsoft Sans Serif” as default font for rendering the text. This leads to preservation difference in generated PDF as each font has different glyphs for characters. +When the necessary fonts used in the Word document have not been installed in the production machine, Essential® DocIO uses "Microsoft Sans Serif" as the default font for rendering the text. This leads to a preservation difference in the generated PDF, as each font has different glyphs for characters. To avoid this, the Essential® DocIO library allows you to set an alternate font for the missing font used in the Word document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/font-substituion-word-to-pdf). @@ -256,17 +262,19 @@ During Word to PDF conversions, if a glyph of the input text is unavailable in t Refer [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/unsupported-elements-word-to-pdf#detailed-limitations) to know about unsupported elements in Word to PDF conversion. -## Show Warning for Unsupported Elements +## Show warning for unsupported elements When converting a Word document to a PDF, the presence of unsupported elements in the input Word document can lead to preservation issues in the converted PDF. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/unsupported-elements-word-to-pdf#show-warning-for-unsupported-elements). -## Online Demo +## Online demo + +Explore live demos of Word to PDF conversion using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO): -* Explore how to convert a Word document to PDF using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/wordtopdf#/tailwind). -* See how to convert a Word document to PDF/UA using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/wordtopdfua#/tailwind). -* See how to convert a Word document to PDF/A using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/wordtopdfa#/tailwind). +* [Convert Word to PDF](https://document.syncfusion.com/demos/word/wordtopdf#/tailwind) +* [Convert Word to PDF/UA](https://document.syncfusion.com/demos/word/wordtopdfua#/tailwind) +* [Convert Word to PDF/A](https://document.syncfusion.com/demos/word/wordtopdfa#/tailwind) -## See Also +## See also * [Supported file formats](https://help.syncfusion.com/document-processing/word/word-library/net/support-file-formats) * [How to perform font substitution in Word to PDF conversion](https://support.syncfusion.com/kb/article/7499/how-to-perform-font-substitution-in-winforms-word-to-pdf-conversion) diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/overview.md b/Document-Processing/Word/Conversions/Word-To-PDF/overview.md index c7e5b514c0..42c12745c1 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/overview.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/overview.md @@ -8,14 +8,14 @@ documentation: UG # Convert Word document to PDF using Syncfusion® Word (DocIO) library -The [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) allows you to convert Word document to PDF within a few lines of code in .NET applications and also it does not require Adobe and Microsoft Word application to be installed in the machine. Using this, you can create an input Word document from scratch or load an existing Word document and then easily convert to PDF. +The [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) allows you to convert a Word document to PDF within a few lines of code in .NET applications and also it does not require Adobe and Microsoft Word applications to be installed on the machine. Using this, you can create an input Word document from scratch or load an existing Word document and then easily convert it to PDF. -The [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) to PDF converter offers high versatility and seamless performance across various .NET platforms, including [Windows Forms](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-window-forms), [WPF](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-wpf), [ASP.NET](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net), [ASP.NET MVC](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-mvc), [ASP.NET Core](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-core), [Blazor](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-blazor), [Xamarin](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-xamarin), [WinUI](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-winui), [.NET MAUI](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-maui). Also, in different environments like [Azure](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-azure), [AWS](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-aws), [Google Cloud](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-google-cloud-platform), [Linux](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-linux), [Docker](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-linux-docker), and [macOS](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-mac). +The [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) PDF converter offers high versatility and seamless performance across various .NET platforms, including [Windows Forms](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-window-forms), [WPF](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-wpf), [ASP.NET](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net), [ASP.NET MVC](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-mvc), [ASP.NET Core](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-asp-net-core), [Blazor](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-blazor), [Xamarin](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-xamarin), [WinUI](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-winui), [.NET MAUI](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-maui). Also, in different environments like [Azure](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-azure), [AWS](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-aws), [Google Cloud](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-google-cloud-platform), [Linux](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-linux), [Docker](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-linux-docker), and [macOS](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-mac). ## Key Features * Ability to [embed fonts](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#embedding-fonts) within the PDF for consistent display. -* Support for converting Word documents to [PDF/UA](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#accessible-pdf-document) (Section 508 compliant). +* Support for converting Word documents to [PDF/UA](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#accessible-pdf-document) (508-compliant). * Support for converting Word documents to [PDF/A](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#pdf-conformance-level) with various PDF conformance levels for long-term archiving and standardization. * Ability to preserve Word document form fields as PDF forms, allowing the creation of [editable PDFs](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#word-document-form-field-to-pdf-form-field). * Convert Word headings to [PDF bookmarks](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#word-document-headings-to-pdf-bookmarks), generating PDF documents with bookmarks based on Word document paragraph styles and outline levels. @@ -38,7 +38,7 @@ Refer to the following links for assemblies required based on platforms to conve To quickly start converting a Word document to a PDF, please check out this video: {% youtube "https://www.youtube.com/watch?v=8QdevnBxgHk" %} -T> If you encounter issues while using the .NET Word library in ASP.NET Core, refer to the [troubleshooting guide](https://support.syncfusion.com/kb/article/16012/troubleshoot-guide-for-aspnet-core-word-docio-library-issues#things-to-check-while-facing-an-issue-in-word-library) for recommended checks and solutions. +T> If you encounter issues while using the .NET Word library in ASP.NET Core, refer to the [Troubleshooting Guide for Word (DocIO)](https://support.syncfusion.com/kb/article/16012/troubleshoot-guide-for-aspnet-core-word-docio-library-issues) for recommended checks and solutions. ## Convert Word to PDF @@ -49,6 +49,8 @@ N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-plat {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} +using System; +using System.IO; using Syncfusion.DocIO; using Syncfusion.DocIO.DLS; using Syncfusion.DocIORenderer; @@ -56,6 +58,7 @@ using Syncfusion.Pdf; {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} +using System; using Syncfusion.DocIO; using Syncfusion.DocIO.DLS; using Syncfusion.OfficeChart; @@ -77,6 +80,8 @@ Imports Syncfusion.Pdf The following code example illustrates how to convert a Word document into PDF document. +N> Ensure that the `Template.docx` file is present in the working directory of your application before running the code. + {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/DocIO-Examples/main/Word-to-PDF-Conversion/Convert-Word-document-to-PDF/.NET/Convert-Word-document-to-PDF/Program.cs" %} @@ -139,16 +144,15 @@ wordDocument.Close() By executing the program, you will get the output PDF as follows. -![Word to PDF conversion](NET/WordToPDF_images/OutputImage.png). +![Word to PDF conversion output](NET/WordToPDF_images/OutputImage.png) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Word-to-PDF-Conversion/Convert-Word-document-to-PDF). -T> For troubleshooting issues in the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO), refer [this](https://support.syncfusion.com/kb/article/16012/troubleshooting-guide-for-syncfusion-word-docio-library-issues?isInternalRefresh=False) article that provides comprehensive guidance on resolving common problems. -N> 1. For .NET Framework, creating an instance of the [ChartToImageConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.OfficeChartToImageConverter.ChartToImageConverter.html) class is mandatory to convert the charts present in the Word to PDF. Otherwise, the charts are not preserved in the converted PDF. Whereas this is not necessary for .NET Core, as ChartToImageConverter is initialized internally in Syncfusion.DocIORenderer.Portable assembly. -N> 2. Total number of pages in the converted PDF may vary based on unsupported elements in the input Word document. -N> 3. "DocIO supports Word to PDF conversion in UWP application using DocIORenderer." For further information, please refer [here](https://support.syncfusion.com/kb/article/8902/how-to-convert-word-document-to-pdf-in-uwp) -N> 4. Font-related issues during Word to PDF or image conversion can arise due to missing or incorrect font. For detailed instructions on resolving these problems, refer to this [article](https://support.syncfusion.com/kb/article/13969/how-to-resolve-font-problems-during-word-to-pdf-or-image-conversion). +N> 1. For .NET Framework, creating an instance of the [ChartToImageConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.OfficeChartToImageConverter.ChartToImageConverter.html) class is mandatory to convert the charts present in the Word to PDF. Otherwise, the charts are not preserved in the converted PDF. Whereas this is not necessary for .NET Core, as `ChartToImageConverter` is initialized internally in the `Syncfusion.DocIORenderer.Portable` assembly. +N> 2. The total number of pages in the converted PDF may vary based on the unsupported elements in the input Word document. +N> 3. DocIO supports Word to PDF conversion in UWP applications using `DocIORenderer`. For further information, please refer [here](https://support.syncfusion.com/kb/article/8902/how-to-convert-word-document-to-pdf-in-uwp). +N> 4. Font-related issues during Word to PDF or image conversion can arise due to a missing or incorrect font. For detailed instructions on resolving these problems, refer to this [article](https://support.syncfusion.com/kb/article/13969/how-to-resolve-font-problems-during-word-to-pdf-or-image-conversion). ## Supported File formats @@ -164,7 +168,7 @@ N> To see limitations and unsupported features in Word to PDF conversion, refer ## Word to PDF conversion in Linux OS -In Linux OS, you can perform the Word to PDF conversion using .NET Core (Targeting .netcoreapp) application. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-linux). +In Linux OS, you can perform the Word to PDF conversion using a .NET Core (Targeting `netcoreapp`) application. Before running the conversion, install the native dependencies required by SkiaSharp and the GDI+ substitute on Linux. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-linux). **Frequently Asked Questions** @@ -192,9 +196,9 @@ This setting allows you to determine whether to preserve document structured tag This setting allows you to determine whether to **preserve Word document headings** (i.e., paragraph with heading style and outline level) as bookmarks in the converted PDF document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#word-document-headings-to-pdf-bookmarks). -### Word document form field to PDF form field. +### Word document form field to PDF form field -This setting allows you to determine whether to **preserve Word document form fields** (Text form field, Checkbox form field and Drop-down form field) as PDF form fields in the converted PDF document. This features helps in creating fillable PDF forms from Word document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#word-document-form-field-to-pdf-form-field). +This setting allows you to determine whether to **preserve Word document form fields** (Text form field, Checkbox form field and Drop-down form field) as PDF form fields in the converted PDF document. This feature helps in creating fillable PDF forms from a Word document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#word-document-form-field-to-pdf-form-field). ### Image quality @@ -214,7 +218,7 @@ This setting allows you to set the PDF conformance level. For further informatio ### Enable Alternate Chunks -In the Word document, another Word documents are embedded in it and referred as AltChunks. This setting allows you to include the alternate chunks while converting Word to PDF conversion. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#enable-alternate-chunks). +In a Word document, another Word document is embedded in it and referred to as an AltChunk. This setting allows you to include or exclude alternate chunks while converting Word to PDF. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#enable-alternate-chunks). ### Complex Script Text @@ -222,7 +226,7 @@ This setting allows you to preserve the **complex script text** in the converted ### Hyphenation in Word-to-PDF conversion -Essential® DocIO now allows hyphenating text in a Word document while converting it to PDF format based on the given language dictionaries. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#hyphenation-in-word-to-pdf-conversion). +This setting allows you to hyphenate text in a Word document while converting it to PDF format based on the given language dictionaries. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#hyphenation-in-word-to-pdf-conversion). ### Track changes in Word-to-PDF conversion @@ -230,15 +234,15 @@ You can **preserve revision marks in a generated PDF document** when converting ### Comments in Word-to-PDF conversion -You can **preserve comments balloon in a generated PDF** when converting Word documents with comments. Also you can customize how comments balloon color appears in a generated PDF. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#comments-in-word-to-pdf-conversion). +This setting allows you to **preserve comment balloons in a generated PDF** when converting Word documents with comments. You can also customize how the comment balloon color appears in a generated PDF. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#comments-in-word-to-pdf-conversion). ### Preserve Ole Equation as bitmap image -You can preserve Ole Equation as bitmap image in the converted PDF document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#preserve-ole-equation-as-bitmap-image). +This setting allows you to preserve an OLE equation as a bitmap image in the converted PDF document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#preserve-ole-equation-as-bitmap-image). ### Restrict all permission in a PDF document -You can restrict all the permission in a PDF document using [PdfPermissionsFlags](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfPermissionsFlags.html). For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#restrict-all-permission-in-a-pdf-document). +This setting allows you to restrict all the permissions in a PDF document using [PdfPermissionsFlags](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Security.PdfPermissionsFlags.html). For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/word-to-pdf-settings#restrict-all-permission-in-a-pdf-document). ### Apply Matte to Transparent Images @@ -246,7 +250,7 @@ This setting allows you to determine whether to **apply a matte color to transpa ## Font Substitution -When the necessary fonts used in the Word document has not been installed in the production machine, then Essential® DocIO uses the ”Microsoft Sans Serif” as default font for rendering the text. This leads to preservation difference in generated PDF as each font has different glyphs for characters. +When a font required by the Word document has not been installed on the production machine, Essential® DocIO uses "Microsoft Sans Serif" as the default font for rendering the text. This leads to preservation differences in the generated PDF, as each font has different glyphs for characters. To avoid this, the Essential® DocIO library allows you to set an alternate font for the missing font used in the Word document. For further information, click [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/font-substituion-word-to-pdf). @@ -256,7 +260,7 @@ During Word to PDF conversions, if a glyph of the input text is unavailable in t ## Unsupported elements in Word to PDF conversion -Refer [here](document-processing/word/conversions/word-to-pdf/net/limitations-word-to-pdf) to know about unsupported elements in Word to PDF conversion. +Refer [here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/unsupported-elements-word-to-pdf) to know about unsupported elements in Word to PDF conversion. ## Show Warning for Unsupported Elements @@ -264,9 +268,9 @@ When converting a Word document to a PDF, the presence of unsupported elements i ## Online Demo -* Explore how to convert a Word document to PDF using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/wordtopdf#/tailwind). -* See how to convert a Word document to PDF/UA using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/wordtopdfua#/tailwind). -* See how to convert a Word document to PDF/A using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/wordtopdfa#/tailwind). +* Convert a Word document to PDF using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) — [live demo](https://document.syncfusion.com/demos/word/wordtopdf#/tailwind). +* Convert a Word document to PDF/UA for accessibility (508 compliance) using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) — [live demo](https://document.syncfusion.com/demos/word/wordtopdfua#/tailwind). +* Convert a Word document to PDF/A for long-term archiving using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) — [live demo](https://document.syncfusion.com/demos/word/wordtopdfa#/tailwind). ## See Also From fde6d93240230d7bffa69c21b98c772f6cb06d52 Mon Sep 17 00:00:00 2001 From: Viswajith-SF4658 Date: Wed, 22 Jul 2026 15:57:33 +0530 Subject: [PATCH 2/7] Modified the non working link Nuget-packages-required-word-to-pdf.md --- .../Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md index c03a8dcf23..b9fab54e38 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md @@ -29,7 +29,7 @@ Package manager console command -{{'[Windows Forms](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-windows-forms)'|  markdownify }}, Console Application (Targeting .NET Framework) +{{'[Windows Forms](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/convert-word-document-to-pdf-in-window-forms)'|  markdownify }}, Console Application (Targeting .NET Framework) Syncfusion.DocToPdfConverter.WinForms From 8ec51cf17e21b4de37a99386370e157f5a7293b3 Mon Sep 17 00:00:00 2001 From: Viswajith-SF4658 Date: Wed, 22 Jul 2026 16:34:41 +0530 Subject: [PATCH 3/7] Resolved CI issues produced in PR --- .../Word-To-PDF/NET/Faqs-word-to-pdf.md | 2 +- .../Nuget-packages-required-word-to-pdf.md | 28 ------------------- .../multithreading-in-word-to-pdf-faqs.md | 2 +- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md index 1042131e5f..a17a17941d 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md @@ -1,6 +1,6 @@ --- title: Word to PDF Conversion FAQs | DocIO | Syncfusion -description: Find answers to common questions about converting Word documents to PDF using Syncfusion DocIO. +description: Find answers to common questions about converting Word documents to PDF using using .NET Word (DocIO) library without Microsoft Word or interop dependencies. keywords: Word to PDF FAQ, DocIO FAQ, Word conversion FAQ, chart conversion, Azure, content controls, multithreading platform: document-processing control: DocIO diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md index b9fab54e38..9759fbe7e8 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Nuget-packages-required-word-to-pdf.md @@ -367,34 +367,6 @@ Install-Package Syncfusion.OfficeChartToImageConverter.Wpf Uninstall-Package Syncfusion.OfficeChartToImageConverter.Wpf -RemoveDependencies ``` -### ASP.NET MVC4 - -**NuGet Package:** Syncfusion.DocToPdfConverter.AspNet.Mvc4 - -The package contains the DocToPdfConverter .NET library that allows you to convert the Word documents to PDF. - -```powershell -// Install package -Install-Package Syncfusion.DocToPdfConverter.AspNet.Mvc4 -``` -```powershell -// Uninstall package -Uninstall-Package Syncfusion.DocToPdfConverter.AspNet.Mvc4 -RemoveDependencies -``` - -**NuGet Package:** Syncfusion.OfficeChartToImageConverter.AspNet.Mvc4 - -The package contains OfficeChartToImageConverter .NET library for converting the chart present in word document to image. - -```powershell -// Install package -Install-Package Syncfusion.OfficeChartToImageConverter.AspNet.Mvc4 -``` -```powershell -// Uninstall package -Uninstall-Package Syncfusion.OfficeChartToImageConverter.AspNet.Mvc4 -RemoveDependencies -``` - ### ASP.NET MVC5 **NuGet Package:** Syncfusion.DocToPdfConverter.AspNet.Mvc5 diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md index 2c25e89ba0..6be89b8d75 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md @@ -329,6 +329,6 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## See also -* [Word to PDF conversion overview](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/word-to-pdf) +* [Word to PDF conversion overview](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/overview) * [Assemblies required for Word to PDF](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/assemblies-required-word-to-pdf) * [NuGet packages required for Word to PDF](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/nuget-packages-required-word-to-pdf) \ No newline at end of file From ee9e3d069fe72d0d21cc4cec78118ed545f97dee Mon Sep 17 00:00:00 2001 From: Viswajith-SF4658 Date: Wed, 22 Jul 2026 17:14:22 +0530 Subject: [PATCH 4/7] Resolved CI issues in UG documentation --- .../Convert-Word-Document-to-PDF-in-Google-App-Engine.md | 4 ++-- .../Conversions/Word-To-PDF/NET/Word-to-pdf-settings.md | 2 +- .../Word-To-PDF/NET/word-to-pdf-conversion-faqs.md | 7 +------ .../Word-To-PDF/NET/word-to-pdf-linux-docker.md | 2 +- .../Word/Conversions/Word-To-PDF/overview.md | 2 +- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Google-App-Engine.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Google-App-Engine.md index bc7cb62ad1..46a4bd9d2a 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Google-App-Engine.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Convert-Word-Document-to-PDF-in-Google-App-Engine.md @@ -133,7 +133,7 @@ Step 1: Open the **Cloud Shell editor**. Step 2: Drag and drop the sample from your local machine to **Workspace**. ![Drag and drop the sample into the Workspace](GCP_Images/GAE_Images/Terminal-WordtoPDF.png) -N> If you have your sample application on your local machine, drag and drop it into the Workspace. If you created the sample using the Cloud Shell terminal command, it will be available in the Workspace. For large files, consider using `gcloud storage cp` instead of drag-and-drop. +N> If you have your sample application on your local machine, drag and drop it into the Workspace. If you created the sample using the Cloud Shell terminal command, it will be available in the Workspace. Step 3: Open the Cloud Shell Terminal and run the following **command** to view the files and directories within your **current Workspace**. @@ -243,7 +243,7 @@ Step 3: Verify that the `Dockerfile` and `app.yaml` files are present in the **W ## Deploy to App Engine -Step 1: To deploy the application to App Engine, run the following command in the Cloud Shell Terminal. Afterwards, retrieve the **URL** from the Cloud Shell Terminal (or run `gcloud app browse`). +Step 1: To deploy the application to App Engine, run the following command in the Cloud Shell Terminal. Afterwards, retrieve the **URL** from the Cloud Shell Terminal. {% tabs %} {% highlight bash tabtitle="CLI" %} diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Word-to-pdf-settings.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Word-to-pdf-settings.md index b06a98c8fe..c49bf0aff8 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Word-to-pdf-settings.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Word-to-pdf-settings.md @@ -828,7 +828,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync Essential® DocIO now allows hyphenating text in a Word document while converting it to PDF format based on the given language dictionaries. These dictionaries prescribe where words of a specific language can be hyphenated. Use the dictionary files as OpenOffice format dictionary. N> 1. If automatic hyphenation is not enabled in the Word document, you can enable it by using [WordDocument.Properties.Hyphenation.AutoHyphenation](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Hyphenation.html#Syncfusion_DocIO_DLS_Hyphenation_AutoHyphenation) of DocIO. -N> 2. You can obtain OpenOffice hyphenation dictionary files (.dic) from the [OpenOffice dictionary repository](https://github.com/LibreOffice/dictionaries). +N> 2. You can obtain OpenOffice hyphenation dictionary files from the [OpenOffice dictionary repository](https://github.com/LibreOffice/dictionaries). N> 3. After converting Word documents to PDF, release any dictionary file streams to avoid memory leaks. Call [Hyphenator.UnloadDictionaries()](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.Hyphenator.html#Syncfusion_DocIO_DLS_Hyphenator_UnloadDictionaries) to free hyphenation resources and optimize performance. The following code sample shows how to hyphenate text in a Word document while converting it to PDF format. diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md index 3c3fad4049..510a88d2ff 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md @@ -33,12 +33,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## How to validate the PDF conformance level in a DocIO-converted PDF? -PDF conformance can be verified using tools like Adobe Acrobat Pro, VeraPDF, Xodo Validator, and PDFCreator Validator. These tools check if the PDF meets compliance standards. DocIO-generated PDFs can be validated using any of these tools to ensure compliance with the required standards. - -**Steps to validate:** -1. Open the converted PDF in any of the validators listed above (for example, VeraPDF). -2. Select the PDF conformance profile (such as PDF/A-1b, PDF/A-2b, or PDF/UA) you want to verify. -3. Run the validation and review the report for any conformance issues. +PDF conformance can be verified using tools like **Adobe Acrobat Pro, VeraPDF, Xodo Validator, and PDFCreator Validator**. These tools check if the PDF meets compliance standards. DocIO-generated PDFs can be validated using any of these tools to ensure compliance with the required standards. For more details on the supported conformance levels in DocIO, refer to [PDF Conformance](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-pdf-conformance). diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-linux-docker.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-linux-docker.md index dbe2607c9a..28b87f211b 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-linux-docker.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-linux-docker.md @@ -17,7 +17,7 @@ The following prerequisites are required before you begin: * [.NET SDK 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) * [Docker Desktop](https://www.docker.com/products/docker-desktop/) (Windows/macOS) or Docker Engine (Linux) installed and running * A valid Syncfusion® license key. Refer to this [licensing guide](https://help.syncfusion.com/common/essential-studio/licensing/overview) to generate and register a key. -* Visual Studio 2022 or laterwith the **.NET desktop development** and **.NET Core cross-platform development** workloads (for the "Add Docker Support" steps in Visual Studio) +* Visual Studio 2022 or later with the **.NET desktop development** and **.NET Core cross-platform development** workloads (for the "Add Docker Support" steps in Visual Studio) ## Steps to convert a Word document to PDF in Linux Docker diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/overview.md b/Document-Processing/Word/Conversions/Word-To-PDF/overview.md index 42c12745c1..cc2296dd91 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/overview.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/overview.md @@ -1,6 +1,6 @@ --- title: Convert Word to PDF in Word Library | DocIO | Syncfusion -description: Learn how to convert a Word document to PDF using the .NET Word (DocIO) library without Microsoft Word or interop dependencies. +description: Learn about how to convert a Word document to PDF using the .NET Word (DocIO) library without Microsoft Word or interop dependencies. platform: document-processing control: DocIO documentation: UG From f8c3179cf6b1e3a6d835c063c4391b981a07aef4 Mon Sep 17 00:00:00 2001 From: Viswajith-SF4658 Date: Wed, 22 Jul 2026 17:31:12 +0530 Subject: [PATCH 5/7] Resolved CI issues and addressed for AI Agent tool --- Document-Processing-toc.html | 2 +- .../Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md | 2 +- .../Word-To-PDF/NET/word-to-pdf-conversion-faqs.md | 4 ++-- Document-Processing/ai-agent-tools/getting-started.md | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index b6baefbd2d..b8a351d595 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -5285,7 +5285,7 @@ FAQs diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md index a17a17941d..7f975d3aa9 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/Faqs-word-to-pdf.md @@ -7,7 +7,7 @@ control: DocIO documentation: UG --- -# Frequently Asked Questions +# Frequently Asked Questions (Word to PDF) The frequently asked questions about Word to PDF conversion in Essential® DocIO are listed below. diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md index 510a88d2ff..39e931c885 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/word-to-pdf-conversion-faqs.md @@ -6,7 +6,7 @@ control: DocIO documentation: UG --- -# Frequently Asked Questions +# Frequently Asked Questions (Word to PDF) The frequently asked questions about Word to PDF conversion in Essential® DocIO are listed below. This page addresses common questions on chart conversion, PDF conformance, font handling, form fields, track changes, and platform-specific issues. @@ -33,7 +33,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## How to validate the PDF conformance level in a DocIO-converted PDF? -PDF conformance can be verified using tools like **Adobe Acrobat Pro, VeraPDF, Xodo Validator, and PDFCreator Validator**. These tools check if the PDF meets compliance standards. DocIO-generated PDFs can be validated using any of these tools to ensure compliance with the required standards. +PDF conformance can be verified using tools like **Adobe Acrobat Pro, VeraPDF and PDFCreator Validator**. These tools check if the PDF meets compliance standards. DocIO-generated PDFs can be validated using any of these tools to ensure compliance with the required standards. For more details on the supported conformance levels in DocIO, refer to [PDF Conformance](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-pdf-conformance). diff --git a/Document-Processing/ai-agent-tools/getting-started.md b/Document-Processing/ai-agent-tools/getting-started.md index 0720ca68c4..99d993ee28 100644 --- a/Document-Processing/ai-agent-tools/getting-started.md +++ b/Document-Processing/ai-agent-tools/getting-started.md @@ -274,7 +274,7 @@ public class AzureBlobStorage : IDocumentStorage public Stream Read(string filePath) { ArgumentException.ThrowIfNullOrEmpty(filePath); - var blob = _container.GetBlobClient(filePath); + var blob = _containerClient.GetBlobClient(filePath); var ms = new MemoryStream(); blob.DownloadTo(ms); ms.Position = 0; @@ -288,7 +288,7 @@ public class AzureBlobStorage : IDocumentStorage try { documentStream.Position = 0; - var blob = _container.GetBlobClient(filePath); + var blob = _containerClient.GetBlobClient(filePath); blob.Upload(documentStream, overwrite: true); return true; } @@ -301,7 +301,7 @@ public class AzureBlobStorage : IDocumentStorage public bool Exists(string filePath) { ArgumentException.ThrowIfNullOrEmpty(filePath); - return _container.GetBlobClient(filePath).Exists(); + return _containerClient.GetBlobClient(filePath).Exists(); } } ``` From 04e4f5cd0138e8e802e12acfca8ec7680c9808f3 Mon Sep 17 00:00:00 2001 From: Viswajith-SF4658 Date: Wed, 22 Jul 2026 18:40:52 +0530 Subject: [PATCH 6/7] Modified as feedback addressed --- .../multithreading-in-word-to-pdf-faqs.md | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md index 6be89b8d75..3f993b55c1 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md @@ -13,20 +13,13 @@ This page covers multithreading and thread-safety support in Word to PDF convers Yes, the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) is thread-safe, and you can create multiple instances of the [WordDocument](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.WordDocument.html) class to load the same file as multiple copies or different Word files, then convert them to PDF using multithreading in C#. -### Multithreading Word to PDF using tasks +### Frequently asked questions about multithreading in Word to PDF The following code example illustrates how to use multithreading to convert multiple copies of a Word document to PDF by creating multiple tasks in C#. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} -using System; -using System.IO; -using System.Threading.Tasks; -using Syncfusion.DocIO; -using Syncfusion.DocIO.DLS; -using Syncfusion.DocIORenderer; -using Syncfusion.Pdf; class MultiThreading { @@ -72,13 +65,6 @@ class MultiThreading {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -using System; -using System.IO; -using System.Threading.Tasks; -using Syncfusion.DocIO; -using Syncfusion.DocIO.DLS; -using Syncfusion.DocToPDFConverter; -using Syncfusion.Pdf; class MultiThreading { @@ -177,13 +163,6 @@ The following code example illustrates how to use a parallel `for` loop to proce {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} -using System; -using System.IO; -using System.Threading.Tasks; -using Syncfusion.DocIO; -using Syncfusion.DocIO.DLS; -using Syncfusion.DocIORenderer; -using Syncfusion.Pdf; class MultiThreading { @@ -229,13 +208,6 @@ class MultiThreading {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} -using System; -using System.IO; -using System.Threading.Tasks; -using Syncfusion.DocIO; -using Syncfusion.DocIO.DLS; -using Syncfusion.DocToPDFConverter; -using Syncfusion.Pdf; class MultiThreading { @@ -281,13 +253,6 @@ class MultiThreading {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -Imports System -Imports System.IO -Imports System.Threading.Tasks -Imports Syncfusion.DocIO -Imports Syncfusion.DocIO.DLS -Imports Syncfusion.DocToPDFConverter -Imports Syncfusion.Pdf Module MultiThreading Public Sub Main(args As String()) From bea6c4a6d69f66ca27db0bc69dc2c94b29c00297 Mon Sep 17 00:00:00 2001 From: Viswajith-SF4658 Date: Wed, 22 Jul 2026 18:42:09 +0530 Subject: [PATCH 7/7] Modified as feedback addressed for usings --- .../NET/faqs/multithreading-in-word-to-pdf-faqs.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md b/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md index 3f993b55c1..937e4876f1 100644 --- a/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md +++ b/Document-Processing/Word/Conversions/Word-To-PDF/NET/faqs/multithreading-in-word-to-pdf-faqs.md @@ -108,13 +108,6 @@ class MultiThreading {% endhighlight %} {% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} -Imports System -Imports System.IO -Imports System.Threading.Tasks -Imports Syncfusion.DocIO -Imports Syncfusion.DocIO.DLS -Imports Syncfusion.DocToPDFConverter -Imports Syncfusion.Pdf Module MultiThreading ' Indicates the number of threads to be created.