Redmine - Defect #22335
Images with non-ASCII file names are not shown in PDF
2016-03-29 07:25 - Go MAEDA

ステータス:

Closed

開始日:

優先度:

Normal

期日:

担当者:
カテゴリ:

PDF export

対象バージョン:3.2.6

Resolution:

Fixed

進捗率:

0%

予定工数:

0.00時間Affected version:

説明
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.
defect-description.jpg
関係しているリビジョン
リビジョン 16485 - 2017-04-05 12:53 - Toshi MARUYAMA
Gemfile: explicitly use rbpdf 1.19.1 (#22335, #24271)
リビジョン 16486 - 2017-04-05 13:04 - Toshi MARUYAMA
Merged r16485 from trunk to 3.3-stable (#22335, #24271)
Gemfile: explicitly use rbpdf 1.19.1.
リビジョン 16487 - 2017-04-05 13:05 - Toshi MARUYAMA
Merged r16485 from trunk to 3.2-stable (#22335, #24271)
Gemfile: explicitly use rbpdf 1.19.1.
リビジョン 16507 - 2017-04-06 19:16 - Jean-Philippe Lang
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.
リビジョン 16512 - 2017-04-06 22:05 - Toshi MARUYAMA
Merged r16507 from trunk to 3.3-stable (#22335, #24271)
Gemfile: use rbpdf 1.19.0.
リビジョン 16513 - 2017-04-06 22:07 - Toshi MARUYAMA
Merged r16507 from trunk to 3.2-stable (#22335, #24271)
Gemfile: use rbpdf 1.19.0.
リビジョン 16520 - 2017-04-08 09:33 - Jean-Philippe Lang
Use rbpdf 1.19.2 (#22335, #24271).
リビジョン 16530 - 2017-04-09 10:14 - Jean-Philippe Lang
Merged r16520 (#22335, #24271).
リビジョン 16531 - 2017-04-09 10:15 - Jean-Philippe Lang
Merged r16520 (#22335, #24271).

2024-10-10

1/4

履歴
#1 - 2016-07-14 06:32 - Kuniharu AKAHANE- ファイル cherryblossoms.png を追加- ファイル cherry blossoms.png を追加
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 ?)Examples:# cherryblossoms.png!cherryblossoms.png!
# cherry blossoms.png!cherry blossoms.png!
# cherry%20blossoms.png!cherry%20blossoms.png!

(include(include

space
space

character,characternotshown

withurl)
encoded,

shown

in

browserbutnotinPDF)

Show resultsShow results
On browser
browser̲view.png
Exported PDF
exported̲pdf.png

Show logs on our web-siteShow logs on our web-site
Started GET "/its/issues/196178.pdf" for <ipaddress> at 2016-07-14 14:17:42 +0900
Processing by IssuesController#show as PDF
Parameters: {"id"=>"196178"}
Current user: kakahane (id=***)
pdf: Image: error: RBPDF error: Image filename is empty.
pdf: Image: error: RBPDF error: Image filename is empty.
Rendered issues/show.pdf.erb (88.5ms)
Completed 200 OK in 106ms (Views: 88.3ms ¦ ActiveRecord: 3.0ms)
Out-Of-Bound GC finished in 0.115697521 sec

Repoduced Environment-1Repoduced Environment-1$ uname -a
Linux 3.10.0-327.13.1.el7.x86̲64 #1 SMP$ cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)

Thu

Mar

31

16:04:38

UTC

2016

Environment:
Redmine version
3.0.7.stable
Ruby version
2.1.7-p400 (2015-08-18)
Rails version
4.2.3
Environment
production
Database adapter
Mysql2SCM:
Subversion
1.8.14
Mercurial
2.6.2
Git
2.6.4
Filesystem
Redmine plugins:
clipboard̲image̲paste
1.10
redmine̲exception̲handler
2.0.0.devel.56f6d28645redmine̲importer
1.2.2
redmine̲plugin̲views̲revisions 0.0.1
redmine̲vividtone̲my̲page̲blocks 20150614
redmine̲work̲time
0.3.1
redmine̲xls̲export
0.2.1.t82024-10-10x86̲64x86̲64x86̲64

GNU/Linux[x86̲64-linux]

2/4

wiki̲external̲filter

0.0.2

Gems:
htmlentities (4.3.1)
passenger (4.0.59)
rbpdf (1.18.7, 1.18.6)
rmagick (2.13.4)

Repoduced Environment-2Repoduced Environment-2$ uname -a
Linux 2.6.32-573.22.1.el6.x86̲64$ cat /etc/centos-release
CentOS release 6.7 (Final)

#1

SMP

WedMar23

03:35:39

UTC

2016

Environment:
Redmine version
3.1.4.stable
Ruby version
2.2.4-p230 (2015-12-16)
Rails version
4.2.5.2
Environment
production
Database adapter
Mysql2SCM:
Subversion
1.8.15
Mercurial
1.4
Git
1.7.1
Filesystem
Redmine plugins:
clipboard̲image̲paste
1.10
redmine̲exception̲handler
2.0.0.devel.56f6d28645
redmine̲importer
1.2.2
redmine̲plugin̲views̲revisions 0.0.1
redmine̲vividtone̲my̲page̲blocks 20150614
redmine̲work̲time
0.3.1
redmine̲xls̲export
0.2.1.t9
wiki̲external̲filter0.0.2
Gems:
htmlentities (4.3.1)
passenger (5.0.27)
rbpdf (1.18.7)
rmagick (2.15.4)

x86̲64x86̲64x86̲64

GNU/Linux[x86̲64-linux]#2 - 2016-07-14 07:00 - Kuniharu AKAHANE- ファイル exported̲pdf.png を追加- ファイル browser̲view.png を追加
Opps, Add captured images.
#3 - 2017-03-30 01:15 - Jun NAITOH
This problem fixed by rbpdf 1.19.1.
please bundle update.
#4 - 2017-03-30 04:47 - Kuniharu AKAHANE
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.
Environment:

Redmine version
Ruby version
Rails version
Environment
Database adapter

3.3.2.stable
2.3.3-p222 (2016-11-21)
4.2.7.1
production
Mysql2[x86̲64-linux]

bundle update results:

2024-10-10

3/4

UsingUsing

rbpdf-font 1.19.1 (was 1.19.0)
rbpdf 1.19.1 (was 1.19.0)#5 - 2017-03-30 04:54 - Go MAEDA- ファイル 22335-with-rfpdf-1.19.1.pdf を追加- ステータス を New から Closed に変更- Resolution を 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 byexecuting bundle update.
22335-with-rfpdf-1.19.1.pdf
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#6 - 2017-04-05 13:06 - Toshi MARUYAMA- 対象バージョン を 3.2.6 にセット
#7 - 2017-04-06 21:54 - Toshi MARUYAMA- ステータス を Closed から New に変更- 対象バージョン を 3.2.6 から 3.4.0 に変更- Resolution を削除 (Fixed)#8 - 2017-04-06 21:55 - Toshi MARUYAMA- ブロック元 Feature #25538: Drop support for Ruby 2.2.1 and ealier, 2.2.2+ is now required を追加#9 - 2017-04-08 09:39 - Jean-Philippe Lang
- 対象バージョン を 3.4.0 から 3.2.6 に変更#10 - 2017-04-08 09:51 - Toshi MARUYAMA- ブロック元 を削除 (Feature #25538: Drop support for Ruby 2.2.1 and ealier, 2.2.2+ is now required)#11 - 2017-04-09 10:15 - Jean-Philippe Lang- ステータス を New から Closed に変更- Resolution を Fixed にセット
Fixed with rbpdf 1.19.2.

ファイル
issue-export-sample.pdf

113 KB

2016-03-29

Go MAEDA

defect-description.jpg

70.4 KB

2016-03-29

Go MAEDA

cherryblossoms.png

36.4 KB

2016-07-14

Kuniharu AKAHANE

cherry blossoms.png

36.4 KB

2016-07-14

Kuniharu AKAHANE

exported̲pdf.png

68.3 KB

2016-07-14

Kuniharu AKAHANE

browser̲view.png

155 KB

2016-07-14

Kuniharu AKAHANE

22335-with-rfpdf-1.19.1.pdf

275 KB2017-03-30

Go MAEDA

2024-10-10

4/4