Images with non-ASCII file names are not shown in PDF
Images with non-ASCII file names are not shown in PDF. Please see the following image. There are two embedded image "shrine.jpg" and "神社.jpg" in a issue description. But "神社.jpg" (an image with non-ASCII file name) are not shown in exported PDF.
Reverts to rbpdf 1.19.0 for now.
Using rbpdf-font 1.19.1
Encoding::UndefinedConversionError: "\x81" to UTF-8 in conversion from Windows-1
252 to UTF-8
An error occurred while installing rbpdf (1.19.1), and Bundler cannot continue.
Make sure that `gem install rbpdf -v '1.19.1'` succeeds before bundling.
#1 Updated by Kuniharu AKAHANE over 3 years ago
Hi, Go Maeda.
Thanks for reporting this issue here.
I reproduced this issue on our site.
Just for your information,
Not only images with non-ASCII file names but also with ASCII file names which includes special characters are not shown in PDF.
I guess url-encoding or url-handling of file-path cause this issue. (somewhere in rbpdf ?)
# cherryblossoms.png !cherryblossoms.png! # cherry blossoms.png (include space character, not shown ) !cherry blossoms.png! # cherry%20blossoms.png (include space character with url encoded, shown in browser but not in PDF) !cherry%20blossoms.png!
#4 Updated by Kuniharu AKAHANE over 2 years ago
Thanks you very much for your time, naito-san.
I tried rbpdf 1.19.1 on our all redmine instanses.
The problem seems to be fixed so far.
Redmine version 3.3.2.stable Ruby version 2.3.3-p222 (2016-11-21) [x86_64-linux] Rails version 188.8.131.52 Environment production Database adapter Mysql2
bundle update results:
Using rbpdf-font 1.19.1 (was 1.19.0) Using rbpdf 1.19.1 (was 1.19.0)
#5 Updated by Go MAEDA over 2 years ago
- File 22335-with-rfpdf-1.19.1.pdf added
- Status changed from New to Closed
- Resolution set to Fixed
I confirmed that images with a file name which contains non-ASCII and whitespace characters is rendered properly after updating to rfpdf 1.19.1 by executing
Thank you for working on this, Naitoh-san. We can close this issue.
Note for those who are in trouble with this problem:
Please run the following commands on your Redmine server.
cd /path/to/redmine bundle update