HOW TO

Programatically add a mapped font to a PDF export

Last Published: April 25, 2020

Summary

Instructions provided describe how to take a TrueType font in the map and export it out to a mapped font using the code below.

Procedure

Make certain to specify the font to map. The following code can be used in conjunction with existing code used to export map to .pdf file.


Code:
'This section maps the TrueType Font to a Mapped Font
Dim pFME As IFontMapEnvironment
Set pFME = pExporter 'QI to already exisitng pExporter object

Dim pFMC As IFontMapCollection
Set pFMC = pFME.FontMapCollection

Dim pFont As IFontMap2
Set pFont = New FontMap

pFont.Mapping("Arial") = "Courier"

Debug.Print pFont.MappedFont

pFont.SetMapping "Arial", "Courier"
pFMC.Add pFont
Debug.Print pFMC.Count

Article ID:000006324

Software:
  • ArcMap 8 x
  • ArcMap 9 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic