We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to perform font substitution in Word to PDF conversion?

Platform: ASP.NET Web Forms |
Control: DocIO |
Published Date: February 23, 2018 |
Last Revised Date: February 23, 2018

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. Due to this font substitution, you could see the difference with the rendered text in the generated PDF/Image files during Word to PDF/Image conversion. To know more about the default font substitution, please refer here.

 

From 2018 Volume 1 release (v16.1.0.24) onwards, Syncfusion provides support to  perform font substitution using event approach while converting a particular Word document as PDF. So, that you can choose any installed font instead of ”Microsoft Sans Serif”.

 

The following code example illustrates how to trigger `SubstituteFont` event during font substitution in Word to PDF conversion. A runnable sample application can be downloaded from here

C#:

 

VB:

 

The following code example illustrates how to set the alternate font when a specified font is not installed in the production environment by using `SubstituteFontEventHandler`.

C#:

 

VB:

 

If you have any questions or require clarification about this support, please let us know in the comments below. You can also contact us through our support forum or Direct Trac. We are happy to assist you as always!

ADD COMMENT
You must log in to leave a comment
Comments
Tomasz Jagusz
Dec 17, 2018

Ideally, there should be a property in Word Document that would return a list of used fonts.
This way the user will be able to check if necessary fonts are installed before starting PDF Conversion.

Reply
Dilli Babu Nandha Gopal [Syncfusion]
Dec 26, 2018

Hi Tomasz,

 

This requirement has been considered as a feature request. Kindly visit our website periodically for feature related updates.

 

Regards,

Dilli babu.

Reply

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon