Project

General

Profile

Actions

Defect #28773

open

PDF export does not display most Vietnamese characters.

Added by Tyler Nguyen over 6 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
PDF export
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

When I export the pdf format, most Vietnamese characters are not displayed. I tested on Redmine 3.4.5.stable, this bug has not been fixed.

I found the cause. It seems the problem comes from rbpdf.
The last rbpdf version without error is 1.18.7

All new versions of rbpdf has errors.
You can use the text below to test if you do not have a Vietnamese keyboard.

Tiếng Việt, còn gọi là tiếng Việt Nam hay Việt ngữ, là ngôn ngữ của người Việt (người Kinh) và là ngôn ngữ chính thức tại Việt Nam. Đây là tiếng mẹ đẻ của khoảng 85% dân cư Việt Nam. Tiếng Việt còn là ngôn ngữ thứ hai của các dân tộc thiểu số tại Việt Nam.

I do not know if this bug can be fixed at Redmine?
Can I use rbpdf 1.18.7 for Redmine new version?

Hope this bug can be fixed.

Thank you !


Files

PDF export does not display most Vietnamese characters.pdf (144 KB) PDF export does not display most Vietnamese characters.pdf PDF export does not display most Vietnamese characters Tyler Nguyen, 2018-05-15 06:46
adobe_reader_11.0.23.png (32 KB) adobe_reader_11.0.23.png Jun NAITOH, 2018-05-19 02:51
mac_osx_sierra_preview.png (36.9 KB) mac_osx_sierra_preview.png Jun NAITOH, 2018-05-19 02:52
firefox60.png (28.4 KB) firefox60.png Jun NAITOH, 2018-05-19 02:55
Screenshot version - PDF export does not display most Vietnamese characters.PNG (39 KB) Screenshot version - PDF export does not display most Vietnamese characters.PNG Screenshot version - PDF export does not display most Vietnamese characters Tyler Nguyen, 2018-05-19 10:35
Actions #1

Updated by Jun NAITOH over 6 years ago

  • Sample Vietnamese Text
    Tiếng Việt, còn gọi là tiếng Việt Nam hay Việt ngữ, là ngôn ngữ của người Việt (người Kinh) và là ngôn ngữ chính thức 
    tại Việt Nam. Đây là tiếng mẹ đẻ của khoảng 85% dân cư Việt Nam. Tiếng Việt còn là ngôn ngữ thứ hai của các dân 
    tộc thiểu số tại Việt Nam.
    
  • Firefox 60 Redmnine Preview result

I tried PDF export does not display most Vietnamese characters.pdf

  • Adobe Reader 11.0.23 (Mac) Result
  • Mac OS X Sirra Preview

When I export the pdf format, most Vietnamese characters are not displayed.

It seems to be no problem to me.
Specifically, where is the problem?

What is the PDF client in your environment?
Does the problem occur even if you use Acrobat Reader in your environment?

Actions #2

Updated by Tyler Nguyen over 6 years ago

I use the Microsoft Edge browser to view PDF files.

It does not seem to have any problems when I use Acrobat Reader to open the files.

I have attached a screenshot when viewing PDF files on the Microsoft Edge browser.

When I use rbpdf 1.18.7, there is not any problem when viewing PDF files on Microsoft Edge browser.

Actions #3

Updated by Jun NAITOH over 6 years ago

It does not seem to have any problems when I use Acrobat Reader to open the files.
When I use rbpdf 1.18.7, there is not any problem when viewing PDF files on Microsoft Edge browser.

  • Redmine 2.6-3.1 (rbpdf 1.18.x) uses embedded fonts. (see #17570)
    This is a method of embedding all specified fonts, so the file size will be as large as several MB.
  • Redmine 3.2-trunk (rbpdf 1.19.x) uses embedded subset-fonts. (see #19017)
    This is a method of embedding only the character to be used, and the file size becomes as small as 100 KB.

If PDF generated by rbpdf 1.19.x (subset font) is displayed in Acrobat Reader, I think there is a problem with subset font processing of Microsoft Edge browser.

If you do not want to use the subset font in Redmine 3.4.5.stable (rbpdf 1.19.x), you can apply it by applying the following patch.

$ diff lib/redmine/export/pdf.rb_org lib/redmine/export/pdf.rb -u
--- lib/redmine/export/pdf.rb_org    2018-05-19 20:23:10.036061097 +0900
+++ lib/redmine/export/pdf.rb    2018-05-19 19:20:06.752736171 +0900
@@ -31,6 +31,9 @@
           FileUtils.mkdir_p @@k_path_cache unless File::exist?(@@k_path_cache)
           set_language_if_valid lang
           super(orientation, 'mm', 'A4')
+
+          set_font_subsetting(false)
+
           set_print_header(false)
           set_rtl(l(:direction) == 'rtl')
Actions

Also available in: Atom PDF