Knowledge Base - Technical Articles
Problem: PDF reports have missing or incorrect characters when the Chinese, Japanese, or Arabic language pack is installed
|Software:||ArcGIS for Desktop Advanced 10.1 ArcGIS for Desktop Standard 10.1 ArcGIS for Desktop Basic 10.1|
|Platforms:||Windows XP, Server 2003, Vista, Server 2008, Windows 7|
For ArcGIS 10.1 with the Chinese, Japanese, Russian, or Arabic language pack installed and the Display Language is set, the optional PDF report files created when running Ordinary Least Squares Regression, Grouping Analysis, and Incremental Spatial Autocorrelation may have missing or incorrect characters.
Esri uses open source Matplotlib software to create the PDF report files. The default Matplotlib font files used by that software are not correct for Chinese, Japanese, Russian, and Arabic languages.
Solution or Workaround
To resolve this issue, the font setting in the Python script used must be changed to generate the report.
- Browse to the script called SSReport.py located at:
<ArcGIS Install Directory>\ArcToolbox\Scripts
- Create a backup of the script SSReport.py that can be reverted to if needed.
- Open SSReport.py using a Python or text editor and locate the following section of code.
- Within the code, find the fontFilePathName and fontFileBoldName variables for the operating system used and language. Check to make sure that the font file specified in the corresponding path exists on the system.
If the font file cannot be found at the specified location, or if ArcGIS is running on a different operating system (Windows XP, for example), see if the font file exists at another location on the computer. If the recommended font file still can’t be located, a font vendor or distributor must be found who can provide this file (such as the Microsoft Download Center).
The font files specified in SSReport.py have been tested with ArcGIS 10.1 for the Ordinary Least Squares, Grouping Analysis, and Incremental Spatial Autocorrelation tools. Other fonts might create correctly formatted PDF reports as well.
- Remove the '#' character (using the Backspace or Delete key) to uncomment the Python code that sets the path to the font for the language setting. For example, if running ArcGIS with the Arabic language pack on a Windows 7 machine, modify the above code block as follows (notice the # character has been removed).
- If using the Japanese language pack, the font size needs to be smaller than other fonts. If you are using ArcGIS 10.1 with no service pack, locate the following section of code and reduce the font size values by 2 (size = 10 would be changed to size = 8, for example).
-show me-Beginning with Service Pack 1 for ArcGIS 10.1, the following code was added to SSReport.py. To use these font settings, uncomment each line by removing the first '#' symbol as shown below: -show me-
- Save the changes and close the Python or text editor.
Last Modified: 8/29/2012