add Chinese support in cfdocument pdf output with the flying saucer engine

Description

`<cfdocument type="modern">` which uses the flying saucer engine to render pdf has problem displaying Chinese as the underlying code uses CP1252 codepage by default causing the rendering of the Asian language to fail. The pdf will be produced with no exception, however, the Asian language characters cannot be seen.

A possible fix has been provided by gaia-jyh can be found here, accompanying reproduction code:

https://dev.lucee.org/t/lucee-flying-saucer-pdf-engine-not-support-chinese-ttf/9524

https://github.com/gaias-jyh/lucee-flyingSaucerPDF

Environment

Lucee 5.3.8.206 / 5.3.9.52-SNAPSHOT
MacOS Monterey 12.1
Java 11.0.12 64bit

also tested in:

OS: window 10
Java Version: 11.0.11 (AdoptOpenJDK) 64bit
Tomcat Version: WildFly / Undertow - 2.2.3.Final
Lucee Version: Lucee 5.3.9.44-SNAPSHOT

Attachments

1
  • 08 Feb 2022, 02:59 pm

Activity

Show:

Brad Wood 30 March 2022 at 16:19

Awesome work, guys!

Pothys - MitrahSoft 30 March 2022 at 14:13

I've checked this ticket with the latest PDF version 1.1.0.7-SNAPSHOT in lucee version 5.3.9.120-SNAPSHOT. Now the Chinese fonts are rendered on pdf with the fontDirectory attribute.

Pothys - MitrahSoft 21 March 2022 at 07:29

For now, no other patch to this. Hope the PDF extension will be available with the above patch soon.

Brad Wood 18 March 2022 at 18:58

will this be fixed in 5.3.9 or is the patch here still needed for Chinese text to display?

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 23 January 2022 at 14:41
Updated 30 March 2022 at 16:19
Resolved 30 March 2022 at 14:13

Flag notifications