Feature #69

Textilized description in PDF

Added by Balazs Dan over 10 years ago. Updated over 6 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Toshi MARUYAMA% Done:

100%

Category:PDF export
Target version:1.3.0
Resolution:Fixed

Description

When exporting an issue then textile symbols (under description and history) appear in PDF files without formatting!

textileissue.pdf (1.97 KB) Balazs Dan, 2008-02-03 10:50

wiki_test_sample.txt Magnifier - wiki test sample (2.83 KB) Jun NAITOH, 2011-06-29 16:43

wiki_test_sample.pdf - wiki test sample result (402 KB) Jun NAITOH, 2011-06-29 16:43

pdf.rb_r6129.patch Magnifier (2.34 KB) Jun NAITOH, 2011-06-29 16:43

tcpdf.rb_r6129.patch Magnifier (25 KB) Jun NAITOH, 2011-06-29 16:43

japanese.rb_r6129.patch Magnifier (2.35 KB) Jun NAITOH, 2011-06-29 16:43

chinese.rb_r6129.patch Magnifier (2.33 KB) Jun NAITOH, 2011-06-29 16:43

korean.rb_r6129.patch Magnifier (2.43 KB) Jun NAITOH, 2011-06-29 16:43

jruby-win-en.pdf (439 KB) Toshi MARUYAMA, 2011-08-18 13:43


Related issues

Related to Redmine - Feature #3261: support attachment images in PDF export Closed 2009-04-29
Related to Redmine - Defect #8737: Broken line of long issue description on issue PDF. Closed 2011-07-02
Related to Redmine - Feature #6280: Multi-issue PDF export New 2010-09-03
Related to Redmine - Defect #61: Broken character encoding in pdf export Closed
Related to Redmine - Defect #4787: Gannt to PNG - CJK (Chinese, Japanese and Korean) charac... Closed 2010-02-10
Duplicated by Redmine - Defect #1785: View PDF : New Issue when opened in PDF, the description ... Closed 2008-08-13
Duplicated by Redmine - Feature #2731: PDF issues export and formated content Closed 2009-02-12
Duplicated by Redmine - Defect #3139: <pre> is not rendered in PDF Closed 2009-04-08
Duplicated by Redmine - Feature #6922: Issues PDF export looses formating Closed 2010-11-17

Associated revisions

Revision 6131
Added by Toshi MARUYAMA over 6 years ago

PDF: import Japanese rfpdf patch for textilized PDF (#69).

Contributed by Jun NAITOH.

Revision 6132
Added by Toshi MARUYAMA over 6 years ago

PDF: import Korean rfpdf patch for textilized PDF (#69).

Contributed by Jun NAITOH.

Revision 6133
Added by Toshi MARUYAMA over 6 years ago

PDF: import Chinese rfpdf patch for textilized PDF (#69).

Contributed by Jun NAITOH.

Revision 6134
Added by Toshi MARUYAMA over 6 years ago

PDF: import rfpdf tcpdf patch for textilized PDF (#69).

Contributed by Jun NAITOH.

Revision 6135
Added by Toshi MARUYAMA over 6 years ago

PDF: add 'ln' parameter for drawing lines at RDMMultiCell() (#69).

Contributed by Jun NAITOH.

Revision 6136
Added by Toshi MARUYAMA over 6 years ago

PDF: use RDMMultiCell for drawing lines of issue description (#69).

Contributed by Jun NAITOH.

Revision 6137
Added by Toshi MARUYAMA over 6 years ago

PDF: add new "RDMwriteHTMLCell" method for textilized PDF (#69).

Contributed by Jun NAITOH.

Revision 6141
Added by Toshi MARUYAMA over 6 years ago

PDF: support textilized issue description on issue (#69).

Contributed by Jun NAITOH.

Revision 6142
Added by Toshi MARUYAMA over 6 years ago

PDF: support textilized journal notes on issue (#69).

Contributed by Jun NAITOH.

Revision 6154
Added by Toshi MARUYAMA over 6 years ago

PDF: support textilized changeset comments (revision log) on issue (#69).

History

#1 Updated by Gumer Coronel Pérez almost 10 years ago

Here you are the patch (broken)

Index: app/helpers/ifpdf_helper.rb
=================================================================
==
--- app/helpers/ifpdf_helper.rb (revisión: 1034)
+++ app/helpers/ifpdf_helper.rb (copia de trabajo)
@@ -22,6 +22,7 @@

   class IFPDF < FPDF
     include GLoc
+    include RFPDF
     attr_accessor :footer_date

     def initialize(lang)

Cambios de propiedades en app/views/issues
_________________________________________________________________
__
Nombre: svn:ignore
   + .index.rfpdf.swp

Index: app/views/issues/_pdf.rfpdf
=================================================================
==
--- app/views/issues/_pdf.rfpdf (revisión: 1034)
+++ app/views/issues/_pdf.rfpdf (copia de trabajo)
@@ -61,7 +61,9 @@
     pdf.Cell(35,5, l(:field_description) + ":")
     pdf.SetFontStyle('',9)
     pdf.MultiCell(155,5, issue.description,"BR")
-    
+
+    pdf.write_html(Redmine::WikiFormatting.to_html(issue.descrip
tion))
+
     pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY)
        pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY)

#2 Updated by Gumer Coronel Pérez almost 10 years ago

I've try fix this bug using RFPDF#write_html method
in views/issues/_pdf.rpdf to format issue.description.

RFPDF#write_html method appear to be broken (html styles doesn't
work, almost for me)

For use write_html method we have to include RFPDF
in ifpdf_helper.rb

Any idea?

#3 Updated by colin moock over 9 years ago

i noticed this defect too. exporting an issue to PDF produces unformatted text, with original formatting characters such as ".h1" shown verbatim. any update on this bug?

#4 Updated by Fabian Buch over 8 years ago

The same applies for numbers. If referred to in comments it's hard to find if it's only printed as "#".

#5 Updated by Frank Helk about 7 years ago

+1

Effect is still alive in 1.0.1. Seen "bold" format in description appearing in PDF as

*bold*

#6 Updated by Frank Helk about 7 years ago

Sorry for posting again: Just tried to get THIS ticket as PDF. Got the same behaviour, so the problem is still alive in 1.0.2.

Seems to need some attention ?

#7 Updated by Ez Dakit almost 7 years ago

+1

#8 Updated by Ian DeFazio almost 7 years ago

+1

#9 Updated by Toshi MARUYAMA over 6 years ago

  • Category set to PDF export

#10 Updated by Etienne Massip over 6 years ago

  • Target version set to Candidate for next major release

#11 Updated by Mister Vince over 6 years ago

Images are also not shown in PDF export. Could it be possible to add it to PDF ?

#12 Updated by Jun NAITOH over 6 years ago

I implemented wiki formatting for Description and Notes.
and I expanded Description field.

Mister Vince wrote:

Images are also not shown in PDF export. Could it be possible to add it to PDF ?

Sorry, I didn't implement show of images in this patch.
but I think to possible.

not implement html (wiki)tag

  • image tag
  • align tag
  • toc

#13 Updated by Toshi MARUYAMA over 6 years ago

  • Assignee set to Toshi MARUYAMA

#14 Updated by Toshi MARUYAMA over 6 years ago

  • Tracker changed from Defect to Feature

#15 Updated by Toshi MARUYAMA over 6 years ago

  • Target version changed from Candidate for next major release to 1.3.0
  • % Done changed from 0 to 70

I have finished code review. Great job!!

#16 Updated by Jun NAITOH over 6 years ago

Thank you!

#17 Updated by Toshi MARUYAMA over 6 years ago

  • File jruby-win-en.pdf added
  • Status changed from New to Closed
  • % Done changed from 70 to 100
  • Resolution set to Fixed
I finished tests on following environments.
  • Linux(Fedora13) CRuby and JRuby,
  • Japanese Windows Mingw Ruby and JRuby 1.6.2.

I attach the PDF which has a revision comment on Windows + JRuby.

Also available in: Atom PDF