Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Font is substituted when generating PDF files from Word layouts

(0) ShareShare
ReportReport
Posted on by

Quite rarely, you might have experienced font substitution when using custom true type fonts with Word Layouts and generating PDF files with the embedded functionality.  

This affects both web client and windows client and any supported version of Dynamics NAV and Business Central that implements Word Layouts.

 

This is the typical scenario

  1. Generating Word files from Word Layout and then converting to PDF: OK
  2. Printing to PDF printer from Word: OK
  3. Generating PDF files from RDL Layout: OK
  4. Generate PDF files from Word layout: applies font substitution.

Below a typical example of fonts substitutions: how it should look like

pastedimage1598351847272v1.png

and how it results after generating PDF from Word Layout with a visible font substitution

pastedimage1598351866654v2.png

This is quite rare to happen and it is due to a 3rd party component (Aspose) that performs the transformation of the word document into PDF.

The Aspose component has to perform a very exotic conversion from word to pdf, within these rare contexts, and applies Font Substitution trying matching the appropriate glyph looking into local machine registry. This is happening when there is a definition of the font within the word document and not the font stored itself.

What is the easy solution, then, within this very rare and specific scenario? Embed fonts in the Word document directly.

 How to achieve this:

  1. Take your docx file template from your extension or from the custom report layout selection page (export layout)
  2. Open docx file with MS Word
  3. Once the document is open go to File > Options
  4. Choose “Save” tab in the Options Form
  5. Check the options “Embeds fonts in file” and “Do not embed common system fonts” as per the following (NOTE: Sales – Invoice.docx is just an example)
  6.  Save the document and close MS Word
  7. Use that docx file in your extension or as template in the custom report layout selection page (import layout) 

pastedimage1598352026411v3.png

This will resolve the issue that you have when generating PDF files from word document layouts since the template document will store fonts (embed) and these will be reused directly as is in the pdf conversion process.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,492 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans