Programatically add a mapped font to a PDF export


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


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.

'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

  • 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