Difference between revisions of "Adding Multibyte Character Set Fonts for PDF Printing"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
 
Line 16: Line 16:
:::<li> Copy the fonts file from <tt>/Windows/Fonts/</tt> folder in your Windows 7 or Windows 8 installation to <tt>/usr/share/fonts/msttcorefonts/</tt> directory in your Linux environment, as these files are OS-independent. </li>
:::<li> Copy the fonts file from <tt>/Windows/Fonts/</tt> folder in your Windows 7 or Windows 8 installation to <tt>/usr/share/fonts/msttcorefonts/</tt> directory in your Linux environment, as these files are OS-independent. </li>
</ol>
</ol>
#
# Delete the <tt> pd4browser.properties </tt> file present under <tt> {INSTALL-DIR}/AgileApps/lib</tt>.  
# Delete the <tt> pd4browser.properties </tt> file present under <tt> {INSTALL-DIR}/AgileApps/lib</tt>.  
::'''Note:''' Take a backup of this file before this operation.
::'''Note:''' Take a backup of this file before this operation.

Latest revision as of 19:44, 4 October 2021

Single-byte fonts print properly but, while multibyte display properly on screen, an additional configuration step is needed to make them available to the PDF rendering engine.

To install multibyte fonts:

  1. Identify the fonts you need.
    For example, for any of the East Asian languages like Chinese, Korean, Hindi, or Japanese, you need the following font files:
    • batang.ttc
    • simsun.ttc
    • mangal.ttf
    • mangalb.ttf
  2. Locate those files.
    • If they are already part of your Linux installation, you should find them at /usr/share/fonts/msttcorefonts/
    • If you do not see the files under /usr/share/fonts/msttcorefonts/,
  1. Download the files from web, and place them in /usr/share/fonts/msttcorefonts/ directory OR
  2. Copy the fonts file from /Windows/Fonts/ folder in your Windows 7 or Windows 8 installation to /usr/share/fonts/msttcorefonts/ directory in your Linux environment, as these files are OS-independent.
  1. Delete the pd4browser.properties file present under {INSTALL-DIR}/AgileApps/lib.
Note: Take a backup of this file before this operation.
  1. Execute the commands to create that configuration file that the PDF rendering engine needs:
    1. cd {install_dir}/AgileApps/lib
      java -jar pd4ml.jar -configure.fonts /usr/share/fonts/msttcorefonts/
      
    2. This step creates the pd4fonts.properties file, which contains a list of fonts and pd4browser.properties file.
  2. Restart Tomcat.
    The fonts are now available for use.