Defect #28773
openPDF export does not display most Vietnamese characters.
0%
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
Updated by Jun NAITOH over 6 years ago
- File adobe_reader_11.0.23.png adobe_reader_11.0.23.png added
- File mac_osx_sierra_preview.png mac_osx_sierra_preview.png added
- File firefox60.png firefox60.png added
- 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?
Updated by Tyler Nguyen over 6 years ago
- File Screenshot version - PDF export does not display most Vietnamese characters.PNG Screenshot version - PDF export does not display most Vietnamese characters.PNG added
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.
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')