Project

General

Profile

Actions

Feature #3261

closed

support attachment images in PDF export

Feature #3261: support attachment images in PDF export

Added by Timo Kosig over 17 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Toshi MARUYAMA
Category:
PDF export
Target version:
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 4 (1 open — 3 closed)

Related to Redmine - Feature #69: Textilized description in PDFClosedToshi MARUYAMAActions
Related to Redmine - Feature #401: Add pdf export for WIKI pageClosedToshi MARUYAMAActions
Related to Redmine - Defect #9533: Redmine Wiki Gchart LaTeX-style Formula plugin and PDF exportClosedActions
Related to Redmine - Feature #9693: support external url images in PDFReopenedActions

Updated by Alex Last over 16 years ago Actions #1

I don't see any images in exported PDF files

Updated by Werner Marcus over 16 years ago Actions #2

+1

Updated by armroe armroe about 16 years ago Actions #3

can this be possible?

Updated by Mister Vince over 15 years ago Actions #4

+1

Updated by Toshi MARUYAMA over 15 years ago Actions #5

  • Category changed from Issues to PDF export

Updated by Terence Mill over 15 years ago Actions #6

+1

Updated by Robert Gröber over 15 years ago Actions #7

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

Updated by Torgrim Brochmann over 15 years ago Actions #8

+1

Updated by Steve Chen about 15 years ago Actions #9

This issue is too important to everyone.
+1

Updated by Steve Chen about 15 years ago Actions #10

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.

Updated by Jun NAITOH about 15 years ago Actions #11

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.)

Updated by Jun NAITOH about 15 years ago Actions #12

Updated by Jun NAITOH about 15 years ago Actions #13

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

Updated by Toshi MARUYAMA about 15 years ago Actions #14

  • Assignee set to Toshi MARUYAMA

Updated by Jun NAITOH about 15 years ago Actions #15

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.

Updated by Toshi MARUYAMA about 15 years ago Actions #16

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

Updated by Toshi MARUYAMA about 15 years ago Actions #17

This is a full patch for r7788.

Updated by Etienne Massip about 15 years ago Actions #18

Won't r7806 break if RMagick is not available?

Updated by Etienne Massip about 15 years ago Actions #19

Etienne Massip wrote:

Won't r7806 break if RMagick is not available?

Ok, it won't.

Updated by Toshi MARUYAMA about 15 years ago Actions #20

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

Updated by Toshi MARUYAMA about 15 years ago Actions #21

This is a full patch for r7810.

Updated by Toshi MARUYAMA almost 15 years ago Actions #22

This is a patch for external url support.

Updated by Toshi MARUYAMA almost 15 years ago Actions #23

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

Updated by Toshi MARUYAMA almost 15 years ago Actions #24

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

I created new issue #9693 for external url images.

Updated by André vS almost 15 years ago Actions #25

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

Updated by Toshi MARUYAMA almost 15 years ago Actions #26

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.

Updated by André vS almost 15 years ago Actions #27

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.

Updated by Toshi MARUYAMA almost 15 years ago Actions #28

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

Updated by André vS almost 15 years ago Actions #29

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.

Updated by Gergo Nyiro over 14 years ago Actions #30

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.

Updated by Miodrag Milic over 12 years ago Actions #31

I still don't see images in Redmine version 2.4

Updated by li an about 12 years ago Actions #32

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.)

Updated by sebastien lemaitre about 12 years ago Actions #33

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

Updated by Toshi MARUYAMA about 12 years ago Actions #34

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.

Updated by li an about 12 years ago Actions #35

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

Updated by li an about 12 years ago Actions #36

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.

Updated by sebastien lemaitre about 12 years ago Actions #37

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

Updated by sebastien lemaitre about 12 years ago Actions #38

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.

Updated by Toshi MARUYAMA about 12 years ago Actions #39

You should use

!image.png!
syntax.

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

Actions

Also available in: PDF Atom