Frequently asked questions about Word to PDF and image conversions

28 Mar 20254 minutes to read

The frequently asked questions about Word to PDF and image conversions using 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?

Yes, OfficeChartToImageConverter assembly is not supported in .NET 3.5 Framework and it is available in .NET 4.0 Framework.

Is it possible to convert 3D charts to PDF or image?

Current version of the DocIO library does not provide support for converting 3D charts to PDF or image format.

Is it possible to specify PDF conformance level in Word to PDF conversion?

Yes, you can specify the PDF conformance level in Word to PDF conversion. For more details, refer PDF Conformance.

Why are content controls not preserved as editable form fields in the converted PDF document even when PreserveFormFields is enabled?

Content controls behave differently from legacy form fields, such as Text, Checkbox, and Drop-down fields, during conversions to PDF format. While legacy form fields are typically preserved as editable form fields in the resulting PDF document, content controls are converted to plain text. The PreserveFormFields API specifically retains the interactive nature of legacy form fields, not content controls.
To ensure that form fields remain editable in the PDF converted from Word document, it is recommended to use Text, Checkbox, and Drop-down form fields instead of content controls in the Word document. Additionally, to preserve the form fields as editable in the resulting PDF, set the PreserveFormFields API to true.

You can download a complete working sample from GitHub.

Why are some fonts missing when converting a Word document to PDF in the Syncfusion® demo application?

The Syncfusion® online demo has a limited set of default fonts. If certain fonts are missing during the Word-to-PDF conversion, it may cause preservation problems.

To ensure the fonts appear exactly as they do in the Word document during PDF conversion in our online demo, we recommend embedding the missing fonts directly into the Word document before performing the conversion. For detailed guidance on embedding fonts in a Word document using Microsoft Word, refer here.

How to edit a Word document in Microsoft Word and convert it to PDF/image simultaneously using the DocIO library?

To preserve editable content while converting a Word document to a PDF or image without closing Microsoft Word, open and edit the document in Word, save the changes, and use the OpenReadOnly method to load the document in read-only mode for conversion. Changes that are not saved in the Word document using Microsoft Word will not appear in the converted PDF or image.

For more details about open Word document in read only mode, refer to the documentation.

Are you experiencing font access problems in IIS during Word to PDF/Image, but not locally?

This issue occurs when fonts are installed using the basic Install option. Fonts installed this way are not shared system-wide, so IIS cannot access them.

To resolve this, uninstall the fonts and reinstall them by right-clicking the font file and selecting the Install for all users option to make them available system-wide. After that, restart your machine and host the application in IIS for seamless functionality.

Refer to the image below for guidance on selecting the Install for all users option:
Install for all users

How to resolve the “SKImageInfo” exception during Word to PDF or image conversion in Linux OS?

If you encounter the exception The type initializer for ‘SkiaSharp.SKImageInfo’ threw an exception, it may be due to installing incompatible versions of the following NuGet packages:

To resolve this, reinstall the correct versions of these NuGet packages as specified in the documentation, along with the required Word to PDF conversion NuGet packages.

If using Docker, ensure you install the libfontconfig package within your Docker container, as mentioned in the documentation.

Will the same fonts be rendered when exporting a document to a PDF file?

Yes, if the fonts used in the document are installed on the machine during PDF conversion, they will be preserved in the output. However, if any fonts are missing, they will be substituted with default fonts, which may affect the appearance of the content.

For details on resolving font preservation issues during Word-to-PDF or image conversion, refer to the documentation.

Why is the chart not preserved during Word-to-PDF or image conversion in .NET Framework?

During Word-to-PDF conversion in .NET Framework, need to initialize the ChartToImageConverter to ensure that the chart is preserved in the PDF document.

The following code example illustrates how to initialize ChartToImageConverter.

//Initializes the ChartToImageConverter for converting charts during Word to pdf conversion
wordDocument.ChartToImageConverter = new ChartToImageConverter();

For more details about the conversion, refer here.

How to convert Word document to PDF/A?

To convert a Word document to PDF/A, refer to this link.

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.