Project

General

Profile

Actions

Feature #3261

closed

support attachment images in PDF export

Added by Timo Kosig almost 15 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Toshi MARUYAMA
Category:
PDF export
Target version:
Start date:
2009-04-29
Due date:
% Done:

100%

Estimated time:
Resolution:
Fixed

Description

When an issue is exported to PDF by using the "PDF" link at the end of the page the inline images which are attached to the issue and displayed on screen are not on the printout.

Only the wiki syntax for displaying the image is printed out like:

!attached_image!

Ideally the PDF export would contain those images as well so that any explanations of bugs which are supported by the images don't become incomprehensible.

See this issue as an example:
With inline images: http://www.redmine.org/issues/3100
No inline images: http://www.redmine.org/issues/3100.pdf

It would be great to get this as a feature as we use the PDF export a lot to give bug reports with screenshots back to external developers.


Files

pdf_export_image_support.patch (19 KB) pdf_export_image_support.patch Jun NAITOH, 2011-10-23 16:19
sample_test.txt (162 Bytes) sample_test.txt Jun NAITOH, 2011-10-23 16:19
sample_cats.jpg (176 KB) sample_cats.jpg Jun NAITOH, 2011-10-23 16:19
sample_ice.gif (84.5 KB) sample_ice.gif Jun NAITOH, 2011-10-23 16:19
beer.png (202 KB) beer.png Jun NAITOH, 2011-10-23 16:25
pdf_export_image_support_jruby_test_fix.patch (18.9 KB) pdf_export_image_support_jruby_test_fix.patch Jun NAITOH, 2011-10-29 08:08
pdf-image-r7742.diff (23.8 KB) pdf-image-r7742.diff Toshi MARUYAMA, 2011-11-06 11:57
pdf-image-r7788.diff (22.8 KB) pdf-image-r7788.diff Toshi MARUYAMA, 2011-11-12 12:35
pdf-image-r7810.diff (6.66 KB) pdf-image-r7810.diff Toshi MARUYAMA, 2011-11-15 01:53
pdf-external-url.diff (830 Bytes) pdf-external-url.diff Toshi MARUYAMA, 2011-11-29 23:29

Related issues

Related to Redmine - Feature #69: Textilized description in PDFClosedToshi MARUYAMA

Actions
Related to Redmine - Feature #401: Add pdf export for WIKI pageClosedToshi MARUYAMA

Actions
Related to Redmine - Defect #9533: Redmine Wiki Gchart LaTeX-style Formula plugin and PDF exportClosed2011-11-06

Actions
Related to Redmine - Feature #9693: support external url images in PDFReopened

Actions
Actions #1

Updated by Alex Last almost 14 years ago

I don't see any images in exported PDF files

Actions #2

Updated by Werner Marcus over 13 years ago

+1

Actions #3

Updated by armroe armroe over 13 years ago

can this be possible?

Actions #4

Updated by Mister Vince almost 13 years ago

+1

Actions #5

Updated by Toshi MARUYAMA almost 13 years ago

  • Category changed from Issues to PDF export
Actions #6

Updated by Terence Mill almost 13 years ago

+1

Actions #7

Updated by Robert Gröber over 12 years ago

+1
Exported pdf files have no value without the releated images!

Actions #8

Updated by Torgrim Brochmann over 12 years ago

+1

Actions #9

Updated by Steve Chen over 12 years ago

This issue is too important to everyone.
+1

Actions #10

Updated by Steve Chen over 12 years ago

There's another way to solve this one...
Is it possible to make a detour like export html or msg file can use imagea within contents...
It might be give more simple implementations...

sorry for my poor engilsh.

Actions #11

Updated by Jun NAITOH over 12 years ago

I implemented include inline images in issue PDF export.

  • need to rmagick.
    • I tested rmagick 2.13.1(Cent OS 6) and 2.12.0(Windows XP)
  • support image format : jpeg,png,gif (Extension is required.)
  • support attachment image file.
    !bar.jpg!
    
  • support remote URI image file.
    !http://www.redmine.org/bar.jpg!
    
  • support Percent-encoding (URL encoding) URI image file.
  • not support relative server path.
    !/foo/bar.jpg!
    
  • not support alignment.
    !>bar.jpg!
    
  • sorry, I am not test on JRuby environment. (but I think to work on JRuby environment without unit test.)
Actions #12

Updated by Jun NAITOH over 12 years ago

Actions #13

Updated by Jun NAITOH over 12 years ago

Sorry, I mistake upload "sample_beer.png" file. please use "beer.png" file.

Actions #14

Updated by Toshi MARUYAMA over 12 years ago

  • Assignee set to Toshi MARUYAMA
Actions #15

Updated by Jun NAITOH over 12 years ago

sorry, I am not test on JRuby environment. (but I think to work on JRuby environment without unit test.)

I tested on JRuby 1.6.2(CentOS 6.0), today. but, I couldn't work RMagick on JRuby...
Sorry, I think that PDF export function with image can't support to JRuby. Because I think to don't work RMagick on JRuby.

  • I rewrote unit test (test_rdm_pdf_iconv_cannot_convert_from_cp932) for JRuby.
    (This unit test is not related to RMagick.)
  • Deleted RAILS_DEFAULT_LOGGER for Rails 3.x compatibility. (change to Rails.logger)

The new patch (pdf_export_image_support_jruby_test_fix.patch) for trunk attached.

Actions #16

Updated by Toshi MARUYAMA over 12 years ago

This is a full patch for r7742.
r7742 has a #401 feature.

Actions #17

Updated by Toshi MARUYAMA over 12 years ago

This is a full patch for r7788.

Actions #18

Updated by Etienne Massip over 12 years ago

Won't r7806 break if RMagick is not available?

Actions #19

Updated by Etienne Massip over 12 years ago

Etienne Massip wrote:

Won't r7806 break if RMagick is not available?

Ok, it won't.

Actions #20

Updated by Toshi MARUYAMA over 12 years ago

  • Subject changed from Include inline images in issue PDF export to Include inline images in PDF export
Actions #21

Updated by Toshi MARUYAMA over 12 years ago

This is a full patch for r7810.

Actions #22

Updated by Toshi MARUYAMA over 12 years ago

This is a patch for external url support.

Actions #23

Updated by Toshi MARUYAMA over 12 years ago

  • Subject changed from Include inline images in PDF export to support attachment images in PDF export
  • % Done changed from 90 to 100
Actions #24

Updated by Toshi MARUYAMA over 12 years ago

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

I created new issue #9693 for external url images.

Actions #25

Updated by André vS about 12 years ago

Hi Toshi,

this Issue seems to be current in the actual stable-version 1.3.1.
When i try to export this issue to pdf the images aren't inline: http://www.redmine.org/issues/3100

Actions #26

Updated by Toshi MARUYAMA about 12 years ago

André vS wrote:

Hi Toshi,

this Issue seems to be current in the actual stable-version 1.3.1.
When i try to export this issue to pdf the images aren't inline: http://www.redmine.org/issues/3100

www.redmine.org is not upgraded.

Actions #27

Updated by André vS about 12 years ago

Ah, i see! Thank you for your reply.
It doesn't seem to be working in my local installation (1.3.1).
Even if use the "masked" format; link enclosed by "!"

I'm using debian squeeze, having the actual version of imagemagick installed.

Actions #28

Updated by Toshi MARUYAMA about 12 years ago

You need to install rmagick.
On Redmine 1.3-stable, run "gem install rmagick".

Actions #29

Updated by André vS about 12 years ago

I've installed debian-packages imagemagick and (libmagickcore-dev or libmagickwand-dev).
One of libmagickcore-dev or libmagickwand-dev is required, otherwise gem install rmagick will fail.
rmagick is installed and active, as i can see under "administration" -> "Information"

But still it's not working for me. PDF-Exports come without images, but HTML-Exports do.

Actions #30

Updated by Gergo Nyiro almost 12 years ago

Hello folks,

I use redmine 1.0.1 from debian stable repo.
Is it possible to create a patch for that version?
Thanks for your help in advance.

Actions #31

Updated by Miodrag Milic almost 10 years ago

I still don't see images in Redmine version 2.4

Actions #32

Updated by li an over 9 years ago

Hi, redmine wiki can export pdf, but if there is image attached in the wiki, exported pdf cannot show the image, is it solved? I am using bitnami redmine 2.3.2, I cannot find solution about this, it is very urgent for us, for we are deciding if we can manage doc on redmine wiki, if pdf cannot show image, it is useless.

Hope to ge reply. Thanks.

Jun NAITOH wrote:

I implemented include inline images in issue PDF export.

  • need to rmagick.
    • I tested rmagick 2.13.1(Cent OS 6) and 2.12.0(Windows XP)
  • support image format : jpeg,png,gif (Extension is required.)
  • support attachment image file.
    [...]
  • support remote URI image file.
    [...]
  • support Percent-encoding (URL encoding) URI image file.
  • not support relative server path.
    [...]
  • not support alignment.
    [...]
  • sorry, I am not test on JRuby environment. (but I think to work on JRuby environment without unit test.)
Actions #33

Updated by sebastien lemaitre over 9 years ago

Hi,

Same problem. Images (png, jpg) with the inline syntax are not displayed in pdf export. It's a pity, so i use chrome or firefox plugins like "Print Friendly & PDF" but it is not convenient.

Environment:
Redmine version 2.2.3.stable
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.12
Environment production
Database adapter MySQL
Redmine plugins:
redmine_people 0.1.6

Actions #34

Updated by Toshi MARUYAMA over 9 years ago

li an wrote:

I am using bitnami redmine 2.3.2, I cannot find solution about this,

You should contact bitnami team.

Do not post to closed issue with target version.

Actions #35

Updated by li an over 9 years ago

Hi, Sebastien,

I exported wiki page with html, and the image in the wiki page is such format "!https://xxx/redmine/attachments/download/xxx/f.png!", when exported html and saved to the local place of the PC, only if I login redmine, then open the html the image can be shown, if redmine is logged out, the image in the html cannot be shown.

And I use wkhtmltopdf to print redmine wiki exported html to pdf, the command is like "wkhtmltopdf C:\Users\xx\AppData\Local\Temp\design.html design.pdf", pdf file does not show image.

Is any way to transfer html with pdf with image displayed....?

sebastien lemaitre wrote:

Hi,

Same problem. Images (png, jpg) with the inline syntax are not displayed in pdf export. It's a pity, so i use chrome or firefox plugins like "Print Friendly & PDF" but it is not convenient.

Environment:
Redmine version 2.2.3.stable
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.12
Environment production
Database adapter MySQL
Redmine plugins:
redmine_people 0.1.6

Actions #36

Updated by li an over 9 years ago

Sorry, I wont' post under this closed issue later. But I do think it is not bitnami issue, redmine 2.3,2.2,2.4 does not solve that issue.

Toshi MARUYAMA wrote:

li an wrote:

I am using bitnami redmine 2.3.2, I cannot find solution about this,

You should contact bitnami team.

Do not post to closed issue with target version.

Actions #37

Updated by sebastien lemaitre over 9 years ago

Hi li,

Sorry but I don't know. Your solution seems me more complicate than mine but why not.

li an wrote:

Hi, Sebastien,

I exported wiki page with html, and the image in the wiki page is such format "!https://xxx/redmine/attachments/download/xxx/f.png!", when exported html and saved to the local place of the PC, only if I login redmine, then open the html the image can be shown, if redmine is logged out, the image in the html cannot be shown.

And I use wkhtmltopdf to print redmine wiki exported html to pdf, the command is like "wkhtmltopdf C:\Users\xx\AppData\Local\Temp\design.html design.pdf", pdf file does not show image.

Is any way to transfer html with pdf with image displayed....?

sebastien lemaitre wrote:

Hi,

Same problem. Images (png, jpg) with the inline syntax are not displayed in pdf export. It's a pity, so i use chrome or firefox plugins like "Print Friendly & PDF" but it is not convenient.

Environment:
Redmine version 2.2.3.stable
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.12
Environment production
Database adapter MySQL
Redmine plugins:
redmine_people 0.1.6

Actions #38

Updated by sebastien lemaitre over 9 years ago

Hi Toshi,

Like Li sorry to re-post a closed issue but I think too that it is not a problem about bitnami. I use a turnkey machine. Even the online demonstration, I noticed this problem.

Toshi MARUYAMA wrote:

li an wrote:

I am using bitnami redmine 2.3.2, I cannot find solution about this,

You should contact bitnami team.

Do not post to closed issue with target version.

Actions #39

Updated by Toshi MARUYAMA over 9 years ago

You should use

!image.png!
syntax.

Again, Do not post to closed issue with target version.

Actions

Also available in: Atom PDF