Defect #22335

Images with non-ASCII file names are not shown in PDF

Added by Go MAEDA about 1 year ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:PDF export
Target version:3.2.6
Resolution:Fixed Affected version:

Description

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.

issue-export-sample.pdf - PDF with problem (113 KB) Go MAEDA, 2016-03-29 06:53

defect-description.jpg (70.4 KB) Go MAEDA, 2016-03-29 07:24

cherryblossoms.png (36.4 KB) Kuniharu AKAHANE, 2016-07-14 06:15

cherry blossoms.png (36.4 KB) Kuniharu AKAHANE, 2016-07-14 06:15

exported_pdf.png (68.3 KB) Kuniharu AKAHANE, 2016-07-14 06:56

browser_view.png (155 KB) Kuniharu AKAHANE, 2016-07-14 06:56

22335-with-rfpdf-1.19.1.pdf (275 KB) Go MAEDA, 2017-03-30 04:52

Associated revisions

Revision 16485
Added by Toshi MARUYAMA 3 months ago

Gemfile: explicitly use rbpdf 1.19.1 (#22335, #24271)

Revision 16486
Added by Toshi MARUYAMA 3 months ago

Merged r16485 from trunk to 3.3-stable (#22335, #24271)

Gemfile: explicitly use rbpdf 1.19.1.

Revision 16487
Added by Toshi MARUYAMA 3 months ago

Merged r16485 from trunk to 3.2-stable (#22335, #24271)

Gemfile: explicitly use rbpdf 1.19.1.

Revision 16507
Added by Jean-Philippe Lang 3 months ago

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.

Revision 16512
Added by Toshi MARUYAMA 3 months ago

Merged r16507 from trunk to 3.3-stable (#22335, #24271)

Gemfile: use rbpdf 1.19.0.

Revision 16513
Added by Toshi MARUYAMA 3 months ago

Merged r16507 from trunk to 3.2-stable (#22335, #24271)

Gemfile: use rbpdf 1.19.0.

Revision 16520
Added by Jean-Philippe Lang 3 months ago

Use rbpdf 1.19.2 (#22335, #24271).

History

#1 Updated by Kuniharu AKAHANE 12 months 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 ?)

Examples:

# 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!

#2 Updated by Kuniharu AKAHANE 12 months ago

Opps, Add captured images.

#3 Updated by Jun NAITOH 3 months ago

This problem fixed by rbpdf 1.19.1.
please bundle update.

#4 Updated by Kuniharu AKAHANE 3 months 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.

Environment:

  Redmine version                3.3.2.stable
  Ruby version                   2.3.3-p222 (2016-11-21) [x86_64-linux]
  Rails version                  4.2.7.1
  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 3 months ago

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 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 Updated by Toshi MARUYAMA 3 months ago

  • Target version set to 3.2.6

#7 Updated by Toshi MARUYAMA 3 months ago

  • Status changed from Closed to New
  • Target version changed from 3.2.6 to 3.4.0
  • Resolution deleted (Fixed)

#8 Updated by Toshi MARUYAMA 3 months ago

#9 Updated by Jean-Philippe Lang 3 months ago

  • Target version changed from 3.4.0 to 3.2.6

#10 Updated by Toshi MARUYAMA 3 months ago

  • Blocked by deleted (Feature #25538: Drop support Ruby 2.2.1 and ealier)

#11 Updated by Jean-Philippe Lang 3 months ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Fixed with rbpdf 1.19.2.

Also available in: Atom PDF