Defect #28125
closedPNG images on a wiki page don't appear in exported PDF
Added by Go MAEDA almost 7 years ago. Updated over 6 years ago.
0%
Description
Please see the following screenshot. The wiki page has 2 inline images, but the PNG image (Redmine logo) doesn't appear in exported PDF.
Environment: Redmine version 3.4.4.devel.17194 Ruby version 2.3.3-p222 (2016-11-21) [x86_64-darwin16] Rails version 5.1.4 Environment development Database adapter SQLite SCM: Subversion 1.9.7 Mercurial 4.3.1 Cvs 1.12.13 Bazaar 2.7.0 Git 2.14.3 Filesystem Redmine plugins: no plugin installed
The PNG image which I used for test is this one: http://www.redmine.org/attachments/download/3458/redmine_logo_v1.png
Files
inline-png-does-not-appear-on-pdf.png (104 KB) inline-png-does-not-appear-on-pdf.png | Go MAEDA, 2018-02-02 08:25 | ||
pdf_export.png (364 KB) pdf_export.png | Jun NAITOH, 2018-03-25 09:16 | ||
Example of bug.png (143 KB) Example of bug.png | T H, 2018-06-06 14:16 | ||
Zrzut ekranu z 2018-06-18 12-00-42.png (40.3 KB) Zrzut ekranu z 2018-06-18 12-00-42.png | Pawel Szafer, 2018-06-18 12:00 | ||
Zrzut ekranu z 2018-06-18 12-01-11.png (383 KB) Zrzut ekranu z 2018-06-18 12-01-11.png | Pawel Szafer, 2018-06-18 12:01 | ||
Zrzut ekranu z 2018-06-18 12-01-38.png (15.8 KB) Zrzut ekranu z 2018-06-18 12-01-38.png | Pawel Szafer, 2018-06-18 12:01 | ||
2.Copy_and_Crop_with_Gimp2.png (368 KB) 2.Copy_and_Crop_with_Gimp2.png | Kuniharu AKAHANE, 2018-06-25 08:48 | ||
1.Microsoft_SnippingTool.png (516 KB) 1.Microsoft_SnippingTool.png | Kuniharu AKAHANE, 2018-06-25 08:49 | ||
3.Use_Clip_and_Paste_Plugin_v1.10_on_Redmine3.3.png (394 KB) 3.Use_Clip_and_Paste_Plugin_v1.10_on_Redmine3.3.png | Kuniharu AKAHANE, 2018-06-25 08:54 |
Updated by Jun NAITOH over 6 years ago
- File pdf_export.png pdf_export.png added
I can't reproduce this issue.
Are there any conditions for reproducing?
$ ruby bin/about sh: darcs: command not found sh: bzr: command not found Environment: Redmine version 3.4.4.stable Ruby version 2.1.2-p95 (2014-05-08) [i686-linux] Rails version 4.2.8 Environment production Database adapter SQLite SCM: Subversion 1.6.11 Mercurial 1.4 Git 1.7.12.4 Filesystem Redmine plugins: no plugin installed
Updated by Pawel Szafer over 6 years ago
Same issue as author. Can I somehow help to investigate it?
Only error in logs I see is:
pdf: Image: error: RBPDF error: Image filename is empty.
It is repeated for each image
Updated by Jun NAITOH over 6 years ago
Pawel Szafer wrote:
Same issue as author. Can I somehow help to investigate it?
How do you describe the contents of the wiki?
Only error in logs I see is:
pdf: Image: error: RBPDF error: Image filename is empty.
It is repeated for each image
The cause is unknown, but the image does not seem to be found.
Is Wiki notation textile or markdown?
Updated by Pawel Szafer over 6 years ago
I've tested both notations textile and markdown.
How do you describe the contents of the wiki?
Don't understand what you mean, but it is mostly markdown text with png images in it. I removed alpha channel from PNG but without any luck.
Installed redmine on Arch Linux and Alpine Linux already.
I can give it a try and make Dockerfile if that helps somehow.
Updated by Xavier Poncet over 6 years ago
Hello, I confirm this trouble. since we have update from 3.2.1 to 3.4.5
I've exactly the same problem, no png appears in the exported wiki page but jpg are visible.
I will add that we noticed a considerable size increase in exported pdf file with the PNG!
Updated by T H over 6 years ago
- File Example of bug.png Example of bug.png added
I noticed this bug in our installation as well. Embedding images in the browser works well, but PDF export results in PNG images not showing correctly. It seems as though only the alpha channel is rendered in the PDF – is that plausible? I did not see any errors or warnings in our logs. A screenshot of the resulting PDF (in Adobe Reader) is attached. (The alpha channel is basically a slight shadow around the PNG image, which is rendered in stark contrast in the PDF.)
Our redmine setup is as follows:
Environment: Redmine version 3.4.4.stable.17194 Ruby version 2.4.1-p111 (2017-03-22) [x86_64-linux] Rails version 4.2.8 Environment production Database adapter Mysql2 SCM: Subversion 1.9.3 Git 2.7.4 Filesystem Redmine plugins: clipboard_image_paste 1.12 redmine_checklists 3.1.9 redmine_editauthor 0.11.0 redmine_highlightjs 1.0.3 redmine_lightbox2 0.4.3 redmine_mentions 0.0.1 redmine_percent_done 1.1.0 redmine_tags 3.2.2
We are using Markdown syntax.
Please let me know if I can provide any other helpful information.
Updated by Jun NAITOH over 6 years ago
I was able to reproduce this problem.
The cause of this problem is rmagick.
But, the implementation of RBPDF also has a problem and will be fixed.
I have created RBPDF's issue.
https://github.com/naitoh/rbpdf/issues/44
Updated by Jun NAITOH over 6 years ago
This problem fixed by rbpdf 1.19.4.
please bundle update.
Updated by Xavier Poncet over 6 years ago
tested right now after bundle update, it's ok for we with redmine 3.4.5 stable, it works !
Updated by Go MAEDA over 6 years ago
- Status changed from New to Resolved
- Assignee set to Go MAEDA
- Target version set to 3.3.9
Updated by Pawel Szafer over 6 years ago
- File Zrzut ekranu z 2018-06-18 12-00-42.png Zrzut ekranu z 2018-06-18 12-00-42.png added
- File Zrzut ekranu z 2018-06-18 12-01-11.png Zrzut ekranu z 2018-06-18 12-01-11.png added
- File Zrzut ekranu z 2018-06-18 12-01-38.png Zrzut ekranu z 2018-06-18 12-01-38.png added
bundle update and restart webserver should be enough?
For me it is not working...
# gem list rbpdf (1.19.4) rbpdf-font (1.19.1)
Same bug still:
pdf: Image: error: RBPDF error: Image filename is empty.
Updated by Jun NAITOH over 6 years ago
Pawel Szafer wrote:
bundle update and restart webserver should be enough?
Yes.
For me it is not working...
Same bug still:pdf: Image: error: RBPDF error: Image filename is empty.
I can't reproduce this message.
Please tell me the followings.
- An image in which the probrem occurs.
- Your environment. (OS, x86 or x64, ruby version, rmagick version, Imagemagick version)
Updated by Pawel Szafer over 6 years ago
Jun NAITOH wrote:
Pawel Szafer wrote:
bundle update and restart webserver should be enough?
Yes.
For me it is not working...
Same bug still:pdf: Image: error: RBPDF error: Image filename is empty.
I can't reproduce this message.
Please tell me the followings.
- An image in which the probrem occurs.
All three images I attached in post above are problematic.
changed name of last image (with white background and Test sign) to 'test.png' and it is working...
For rest of images, which are more complex name changing doesn't help really.
- Your environment. (OS, x86 or x64, ruby version, rmagick version, Imagemagick version)
My env.
What | version |
OS | Alpine OS x64 |
Kernel | 4.15.17-1-pve |
ruby | 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux-musl] |
rails | 4.2.8 |
redmine | 3.4.5.stable |
ImageMagick | ImageMagick 7.0.7-11 Q16 x86_64 |
Rmagick | rmagick (2.16.0) |
RBPDF | 1.19.4 |
rbpdf-font | 1.19.1 |
Updated by Jun NAITOH over 6 years ago
My env.
What version OS Alpine OS x64 Kernel 4.15.17-1-pve ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux-musl] ImageMagick ImageMagick 7.0.7-11 Q16 x86_64 Rmagick rmagick (2.16.0)
Thanks your information.
I tried installing RMagick on Alpine Linux v3.7(x86_64) Extended.But RMagick (2.16.0) does not seem to support ImageMagick 7.
Is not it a problem with your environment?
# uname -a Linux alp 4.9.65-1-hardened #2-Alpine SMP Mon Nov 27 15:36:10 GMT 2017 x86_64 Linux # ruby -v ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux-musl] # bundle install --without development test : (snip) : Installing rmagick 2.16.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /usr/lib/ruby/gems/2.4.0/gems/rmagick-2.16.0/ext/RMagick /usr/bin/ruby -r ./siteconf20180621-23353-1k7c7k9.rb extconf.rb checking for gcc... yes checking for Magick-config... no checking for pkg-config... yes Package MagickCore was not found in the pkg-config search path. Perhaps you should add the directory containing `MagickCore.pc' to the PKG_CONFIG_PATH environment variable Package 'MagickCore', required by 'virtual:world', not found Warning: Found a partial ImageMagick installation. Your operating system likely has some built-in ImageMagick libraries but not all of ImageMagick. This will most likely cause problems at both compile and runtime. Found partial installation at: /usr checking for outdated ImageMagick version (<= 6.4.9)... *** extconf.rb failed ***
# apk info imagemagick imagemagick-7.0.7.11-r1 description:
Updated by Pawel Szafer over 6 years ago
Check it out: http://ec2-35-158-221-148.eu-central-1.compute.amazonaws.com:8080/projects/test/wiki/Wiki
I can give you access to ssh, contact me by e-mail for that.
This is what I installed on Alpine:
- name: Install Redmine deps from APK apk: name: "{{ item }}" state: latest with_items: - ruby-rmagick - ruby-json - ruby-bigdecimal - ruby-rdoc - ruby-ffi - tzdata - git - mysql-client - mariadb-client-libs - mariadb-dev - imagemagick - imagemagick-c++ - imagemagick-dev - imagemagick-libs - imagemagick6-libs - coreutils - libatomic - readline - readline-dev - libxml2 - libxml2-dev - libxml2-utils - ncurses-terminfo-base - ncurses-terminfo - libxslt - libxslt-dev - zlib-dev - zlib - ruby - yaml - yaml-dev - libffi-dev - build-base - nodejs - ruby-io-console - ruby-irb - ruby-rake - make - gcc - g++ - libffi-dev - ruby-dev
Updated by Jun NAITOH over 6 years ago
I fixed it with rbpdf 1.19.4, but since the fix was incorrect, I released rbpdf 1.19.5.
please bundle update.
The fixed issues is as follows.
I can give you access to ssh, contact me by e-mail for that.
I used your environment.
Thanks to Mr. Pawel Szafer.
Updated by Pawel Szafer over 6 years ago
I can confirm that now images are exported correctly.
Thank you very much!
Updated by Kuniharu AKAHANE over 6 years ago
- File 1.Microsoft_SnippingTool.png 1.Microsoft_SnippingTool.png added
- File 2.Copy_and_Crop_with_Gimp2.png 2.Copy_and_Crop_with_Gimp2.png added
- File 3.Use_Clip_and_Paste_Plugin_v1.10_on_Redmine3.3.png 3.Use_Clip_and_Paste_Plugin_v1.10_on_Redmine3.3.png added
Hi,
After bundle update and Redmine app restart, rbpdf 1.19.5 works fine and all png images exported to pdf correctly on our environment.
Thank you for your time and effort, Naito san, Maeda san and Mr.Pawel Szafer.
- Just for your infomation, Tested EnvironmentTested Environmentand Affected alpha 1-bit png images on our siteAffected alpha 1-bit png images on our site
- CentOS Linux release 7.4.1708 (Core)
- Version: ImageMagick 6.7.8-9 2016-06-16 Q16
- rmagick (2.16.0)Redmine Environment:
Redmine version 3.3.8.stable
Ruby version 2.3.3-p222 (2016-11-21) [x86_64-linux]
Rails version 4.2.7.1
Environment production
Database adapter Mysql2
Redmine plugins:
clipboard_image_paste 1.10- 1.Microsoft_SnippingTool.png
$ identify -verbose 1.Microsoft_SnippingTool.png Image: 1.Microsoft_SnippingTool.png Format: PNG (Portable Network Graphics) Class: DirectClass Geometry: 602x402+0+0 Resolution: 47.24x47.24 Print size: 12.7434x8.50974 Units: PixelsPerCentimeter Type: TrueColorAlpha Endianess: Undefined Colorspace: sRGB Depth: 8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit *alpha: 1-bit*
- 2.Copy_and_Crop_with_Gimp2.png
$ identify -verbose 2.Copy_and_Crop_with_Gimp2.png Image: 2.Copy_and_Crop_with_Gimp2.png Format: PNG (Portable Network Graphics) Class: DirectClass Geometry: 600x396+0+0 Resolution: 28.35x28.35 Print size: 21.164x13.9683 Units: PixelsPerCentimeter Type: TrueColorAlpha Endianess: Undefined Colorspace: sRGB Depth: 8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit *alpha: 1-bit*
- 3.Use_Clip_and_Paste_Plugin_v1.10_on_Redmine3.3.png
$ identify -verbose 3.Use_Clip_and_Paste_Plugin_v1.10_on_Redmine3.3.png Image: 3.Use_Clip_and_Paste_Plugin_v1.10_on_Redmine3.3.png Format: PNG (Portable Network Graphics) Class: DirectClass Geometry: 599x400+0+0 Resolution: 72x72 Print size: 8.31944x5.55556 Units: Undefined Type: TrueColorAlpha Endianess: Undefined Colorspace: sRGB Depth: 8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit *alpha: 1-bit*
- 1.Microsoft_SnippingTool.png
Updated by Go MAEDA over 6 years ago
- Status changed from Resolved to Closed
- Resolution set to Fixed
Updated the Gemfile. Thank you all for the contribution!