0

I have found in this link about display Chinese and Thai fonts: xslt fo does not show chinese or thai fonts

But I don't know how to apply this to my XSLT. I am using Apache FOP version 2.0 I have tried changing output encoding to TIS-620, UTF-8 but not work when output to PDF.

Below is my xslt:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:fo="http://www.w3.org/1999/XSL/Format">

    <xsl:output method="xml" encoding="UTF-8" indent="yes"/>

Anyone has experience with this will be very helpful:)

Thanks in advance.

Mandy
  • 1
  • There is nothing to change in your XSLT, you need to change your configuration of Apache FOP to include fonts which can render the scripts you are using. Look into the FOP documentation about fonts and the PDF configuration section. – Martin Honnen Dec 11 '20 at 11:49
  • Hi Martin: Thanks. Should I config in FOP for font “Arial Unicode MS” that to use for all languages, isn’t it? Can normal font like Tahoma, Regular display Thai characters too? Pls help recommend which font to config at FOP. Thanks in advance again. – Mandy Dec 12 '20 at 03:14
  • I would start with putting `` in the config section for PDF and then see whether you get anything rendered. – Martin Honnen Dec 12 '20 at 08:18
  • Hi Martin: Many thanks. Just to provide more info in the PDF properties that can print Thai, it is like this: Tahoma(Embedded),Type:Truetype(CID),Encoding:Identity-H. So let me try your config above. Then in my xslt I should use font Tahoma, isn’t it? – Mandy Dec 12 '20 at 09:53
  • For me e.g. `เป็นอย่างไรบ้าง?` renders fine on Windows if the `` shown earlier is set up. – Martin Honnen Dec 12 '20 at 10:07

0 Answers0