Generating reports in PDF format with custom fonts in Dynamics 365 for Finance and Operations

In this article we will explain how to use custom fonts in Dynamics 365 for Finance and Operations reports, when generating them in PDF format. By “custom fonts” we mean fonts that are not installed in a D365FO environment.

In order to use custom fonts in SSRS report designs, these fonts need to be installed on the machine where SSRS Reporting Services is running.

Unfortunately, if you have a Dynamics 365 for Finance and Operations cloud environment you will not be able to install any custom fonts on the SSRS Reporting services node, because all machines running on Azure are managed, and interfacing can only be done via LCS.

This is an official response from Microsoft:

Usually the cloud service does not support custom fonts. Exceptionally one can open a ticket to request the installation. But this process is not scalable and can theoretically cause errors in the most productive systems, so it is not recommended.

 

Docentric AX rendering engine runs as a part of AOS but unlike SSRS Reporting Services it allows using of custom fonts. You can embed custom fonts you need to use in your templates (aka Docentric designs), or you can store them as AOT resources.

Template-embedded fonts

MS Word has an option that allows a user authoring a document to embed all non-system fonts into the document itself. Remember that report templates are just ordinary Word documents.

In other words, if the user chose to embed custom fonts in a report template document, they will be always available to Docentric AX rendering engine. The rendering engine will simply extract the fonts from the template document if the fonts won’t be available on the system.

Note that MS Word will not embed a font into a report template if the font’s license does not permit font embedding and distribution.

A drawback of this technique might be increasing a template size if many different custom fonts are used and embedded into it. But still, having a template of several megabytes instead of just 100kb should be completely negligent in terms of performance penalty.

Fonts as AOT resources

You can also add any custom fonts as AOT resources. Docentric AX engine will simply search for all AOT fonts when AOS process starts and load them so that they will be available for all subsequent report executions. This means that there is no need to embed fonts in templates since AOT fonts act exactly the same as the system-installed fonts from the Docentric AX engine’s perspective.

Note that AOT fonts are static and need to be added by developers during development just like any other AOT resource. These fonts will then be available on any D365FO system where the solution has been deployed.

Read also about printing reports with custom fonts >>

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Docentric respects your privacy. Learn how your comment data is processed >>