multi-language PDF

26 views
Skip to first unread message

Martin Pipho

unread,
Jul 22, 2020, 9:11:37 PM7/22/20
to DITA-OT Users
Hi everyone,

I need to create a multiple language PDF, where each chapter in the bookmap has it's own xml:lang attribute for the purposes of generated text and possible language-specific processing. Any hints or suggestions? I am using a custom plugin with the v3.3.4 toolkit.

Thanks!
Martin


Jarno Elovirta

unread,
Jul 23, 2020, 2:34:47 AM7/23/20
to Martin Pipho, DITA-OT Users
Hi

If you need to use different fonts for different languages, you need to disable I18N processing in PDF2. E.g. https://www.elovirta.com/2016/02/18/font-configuration-in-pdf2.html has info on this.

IIRC the generated text takes the current node as the context for determining the language. You may have to override this if the topic themselves don’t have the correct xml:lang attribute, or you have to post-process the merged topic file to cascade the language definitions from the chapters into the topics. The latter may be easier.

J

--
You received this message because you are subscribed to the Google Groups "DITA-OT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/dita-ot-users/024808a9-4a8d-4ad1-962e-d3c114b41a0do%40googlegroups.com.

Toshihiko Makita

unread,
Jul 23, 2020, 10:13:43 AM7/23/20
to DITA-OT Users
Hi Martin,

If you want to generate multiple language support PDF, choosing PDF5-ML plug-in will be the best choice. It supports native multiple language style support without changing stylesheet template codes.
  • You can define language specific styles and literals per language-tag (xml:lang) via style-definition file in plug-in "config" folder. (config/en-US_style.xml, config/ja-JP_style.xml and so on)
  • The most appropriate style will be automatically  adopted  by the default stylesheet processing using @xml:lang attribute.
  • You can freely add your language customization by adding xxx_style.xml (xxx: language-tag) in plug-in config folder. 
  • The style-definition files are not only for language-tag. They allows template users to write document specific, paper-size specific, output-type specific style definitions. 
DITA-OT bundled PDF2 is originally developed by IDIOM as "FO" plug-in and maintained by many developers without having the consistent development policy for a long years. It uses static xsl:attribute/@xsl:use-attribute mechanism and thus it cannot define conditional styling definition. In contrast PDF5-ML merely uses xsl:attribute. Instead all of the styles were written in config/xxx_style.xml files and they are applied dynamically for the output XSL-FO generation. This mechanism make great flexibility for applying plug-in to the actual PDF publishing needs.

Please visit PDF5-ML repository on GitHub and if you have any questions or suggestions regarding PDF5-ML, please let me know.

Regards,
-- 
/*------------------------------------------------------------------------------------- 
 Toshihiko Makita
 Development Group. Antenna House, Inc. Ina Branch
 Web site:
 http://www.antenna.co.jp/
 http://www.antennahouse.com/
 ---------------------------------------------------------------------------------------*/   

2020年7月23日木曜日 10:11:37 UTC+9 Martin Pipho:
Reply all
Reply to author
Forward
0 new messages