Installing External Character Maps (CMaps)  

 

This feature is available starting version 4 of PDFCreator

Some PDF files are not self-contained and require additional character mapping files (CMaps) in order to view or print. This is mostly the case with PDF files containing Asian fonts that are not embedded into the file

There are two types of CMaps:

There are more than a hundred encoding types and more than 200 character mapping files. The list is published by Adobe and the files are made available for public use and distribution.

For convenience, Amyuni has made these files available for download.

 

Two attributes have been added to the Document object in order to determine the location from which the control will download these files:

CMapLocation and

CMapWebLocation.

By default, when the PDFCreator control needs one of these maps, it tries to load it from the folder where the control is registered.

 

The developer can change this default location by setting the CMapLocation attribute, e.g.:

document["CMapLocation"] = "C:\\MyApplication\\CMaps"

 

When the character is not found in the specified folder, the control will attempt to download it from the location specified in CMapWebLocation to the CMapLocation. By default, CMapWebLocation is set to an empty string so that the control does not access the web without knowledge of the application developer.

This attribute can be set by the developers to the Amyuni web location mentioned above or to any location they choose, e.g.:

document["CMapWebLocation"] =  "http://www.amyuni.com/downloads/CMaps"

 

The PDFCreator control raises a warning message when the PDF file requires additional character maps. The warning PDF_WRN_CANNOT_FIND_FONT_CMAP (0x80002000) is raised when a required CMap is missing. The warnings returned by the PDFCreator control are described in the GetWarningLevel method.