Re: PDF output in Chinese

Mica Semrick

Hi Andrew,

This sounds like a font mapping problem. Your PDF reader is responsible for choosing the TOC and bookmark fonts.

You can test to try and eliminate some points of failure by feeding some non Rita chinese content directly to XEP (use the same XEP config your use for the DOT). Then you can exclude or include XEP as being part of the problem.

Also make sure you have the appropriate Chinese fonts installed on your windows machine.

Hope that helps a little.


On January 4, 2019 1:37:03 PM PST, "andrewcameron819@... [dita-users]" wrote:

Hi all and Happy New Year!

Dita version: 1.5.2 M04

XML editor: XMLSpy 2008 SP1

Windows 10


I currently produce webhelp in Chinese for a customer; however, the customer has recently requested, in addition to the English PDF that is provided, that a PDF of the help in Chinese be provided, too.

I assumed this would be a fairly simplistic effort, seeing as creating the English PDF was easy enough, and seeing as I already use the same topic files for the Chinese webhelp. But as I have often discovered with dita, what should be simple enough usually turns out to be anything but and often overly complex. Such seems to be the case with trying to produce a PDF with Chinese text (SimSun).

I have been doing a fair bit of research in this group and others (,, for example), and while I have found some reports of a similar issue, none of the potential resolutions has been able to resolve the problem I am having. For example, some contributors reported getting number signs (#) instead of Chinese characters. I am not getting this; rather, I am not getting any Chinese characters at all from the topic files.

What is strange, is that I do get *some* Chinese characters appearing correctly in the PDF; that is, the TOC (bookmarks in leftmost pane) entries in the PDF appear correctly in Chinese, but the content (in rightmost pane) of the topic files does not. The TOC entries are pulled either from a navtitle in the ditamap (translated) or direct from the (translated) topic file. I find it bizarre that the same topic title (<title>) appears correctly in the PDF TOC, but not in the content (topic) pane, even though each is referencing the exact same data.

So far, I have learned/tried the following:

  1. By default, dita is not set up to produce PDF output in Chinese (though I have also found conflicting reports as to whether this is actually true).
    It certainly seems to be the case with my setup. I doubt any of my predecessors would have disabled it!
  2. All relevant ditamaps and topic files must be set up with the correct language attribute; namely, xml:lang="zh-cn".
    This was already set up correctly, as I am referencing the same files used for the Chinese webhelp output I mentioned, in which the Chinese appears just fine.
  3. Apparently, there is some debate whether the language attribute should be "zh-cn" or "zh_CN".
    As stated in item 2, above, everything was set up correctly for the Chinese webhelp output (zh-cn), so, presumably, this should not be an issue in the PDF output. That is, logically, it wouldn't make sense for the format of the language attribute to differ according to output (would it?).
  4. The Chinese fonts must be added to the font-mappings file.
    I added them to dita\demo\fo\cfg\fo\font-mappings.xml, but to no affect.
  5. The PDF renderer (renderx) may not be set up correctly.
    I added the Chinese fonts to dita\demo\fo\lib\xep\xep.xml, but to no affect.
  6. Attempted to create output with another font, DengXian, but to no affect.      

I should probably mention, too, that yes, I realize the version of dita I'm using is quite old. Upgrading is not really an option, because the implementation here is customized significantly, and I have no idea if it was set up to easily allow for such an upgrade.

So, as mentioned in item 1, I think what I need is step-by-step instructions to set up dita to produce PDF output in Chinese. I have tried to figure out the setup, but I think my effort is sort of a piecemeal. Clearly, I am missing something.

Any assistance would be greatly appreciated.

Join to automatically receive all group messages.