Project

General

Profile

Actions

Patch #5629

closed

Wrap text fields properly in PDF

Patch #5629: Wrap text fields properly in PDF

Added by Hugo Ferreira over 16 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Toshi MARUYAMA
Category:
PDF export
Target version:

Description

This patch fixes wrapping problems with text fields (subject and custom text and long text fields) when generating a PDF.

The main fixes were:

Single Issue:
  • wrap subject in both the page title and in the table cell
  • the description was not being printed
  • wrap journal details indicating what changed
Issues List:
  • wrap text in all cells of the table, regardless of type
  • give custom "text" and "long text" fields the same width weight as the subject

Files

wrap_text_fields_in_pdf_r3764.patch (7.38 KB) wrap_text_fields_in_pdf_r3764.patch Patch for wrap text fields in PDF Hugo Ferreira, 2010-06-01 13:47
sandbox-1.pdf (3.15 KB) sandbox-1.pdf Example PDF export of a "Single Issue" Hugo Ferreira, 2010-06-01 13:47
export.pdf (4.42 KB) export.pdf Example PDF export of an "Issues List" Hugo Ferreira, 2010-06-01 13:47
issue5629_wrap_text_fields_in_pdf_r4213.patch (7.17 KB) issue5629_wrap_text_fields_in_pdf_r4213.patch Patch updated for Redmine 1.0.2 Hugo Ferreira, 2010-09-29 02:08
issue5629_wrap_text_fields_in_pdf_r4784.patch (7.46 KB) issue5629_wrap_text_fields_in_pdf_r4784.patch Patch updated for Redmine v1.1.1 (r4784) Hugo Ferreira, 2011-02-01 14:53
chinese.rb.patch (364 Bytes) chinese.rb.patch Jun NAITOH, 2011-04-30 07:39
before_chinese.rb.patch.png (53.5 KB) before_chinese.rb.patch.png Jun NAITOH, 2011-04-30 07:39
after_chinese.rb.patch.png (53.1 KB) after_chinese.rb.patch.png Jun NAITOH, 2011-04-30 07:39

Related issues 3 (0 open — 3 closed)

Related to Redmine - Defect #61: Broken character encoding in pdf exportClosedToshi MARUYAMAActions
Related to Redmine - Defect #7386: NoMethodError on pdf exportClosedActions
Has duplicate Redmine - Defect #4686: When exporting to PDF, text should wrap and honor newlines, instead of being constrained to one lineClosedActions

Updated by David Le Dieu over 16 years ago Actions #1

Thanks for addressing this Hugo - it will certainly be a nice improvement. I am trying to run the patch but get the following output...

bash-4.1$ patch p0 < wrap_text_fields_in_pdf_r3764.patch
patching file patch
Hunk #1 FAILED at 87.
Hunk #2 FAILED at 100.
Hunk #3 FAILED at 122.
Hunk #4 FAILED at 140.
Hunk #5 FAILED at 159.
Hunk #6 FAILED at 174.
Hunk #7 FAILED at 185.
Hunk #8 FAILED at 194.
Hunk #9 FAILED at 247.
Hunk #10 FAILED at 286.
10 out of 10 hunks FAILED -
saving rejects to file patch.rej

Any idea what I might be doing wrong? I am running the latest bitnami redmine stack if that gives you any clues.

Updated by Hugo Ferreira about 16 years ago Actions #2

Eric, can't you check this patch I've just updated for v1.0.2?
Would it be possible to get it in while it is still up-to-date with the latest version of the "lib/redmine/export/pdf.rb" file?

Updated by Hugo Ferreira about 16 years ago Actions #3

David Le Dieu wrote:

Any idea what I might be doing wrong? I am running the latest bitnami redmine stack if that gives you any clues.

Not really sure, but most likely at the time the bitnami version had already moved past the v0.9.4 against which the patch was made.

This new version tested successfully against Redmine v1.0.2 (r4213) so you can try it again on that version, although I believe the bitnami is still at v1.0.1 and considering that the patched file was changed from v1.0.1 to v1.0.2 I'm not sure it'll update successfully.

Updated by Eric Davis about 16 years ago Actions #4

  • Assignee deleted (Eric Davis)

Updated by Michael P almost 16 years ago Actions #5

Hi,
is this patch still working for V1.1.0?

Updated by Michael P almost 16 years ago Actions #6

  • Assignee set to Hugo Ferreira

Updated by Hugo Ferreira almost 16 years ago Actions #7

Nope, it does not apply successfully to the latest v1.1.1, since there was a small change made in r4736 that touched one of the lines of the patch.

I'm attaching a new patch that works on the latest r4784: "issue5629_wrap_text_fields_in_pdf_r4784.patch"

Updated by Hugo Ferreira almost 16 years ago Actions #8

Now, who can pick this up and commit it to trunk?
(before the main code moves yet again and invalidates this patch… it's been 8 months, already!)

Updated by Etienne Massip almost 16 years ago Actions #9

  • Category set to PDF export

Updated by Toshi MARUYAMA over 15 years ago Actions #10

  • % Done changed from 100 to 50

Updated by Toshi MARUYAMA over 15 years ago Actions #11

  • Status changed from Resolved to New
  • Assignee changed from Hugo Ferreira to Toshi MARUYAMA

Updated by Toshi MARUYAMA over 15 years ago Actions #12

  • Status changed from New to Closed
  • Target version set to 1.2.0
  • % Done changed from 50 to 100

Committed in r5604, thanks.

Updated by Jun NAITOH over 15 years ago Actions #13

I found the bug of the Automatic line break in Chinese PDF of r5604.
This is FPDF original bug. (Japanse and Korean don't have this problem)

I wrote patch.

Updated by Toshi MARUYAMA over 15 years ago Actions #14

  • Status changed from Reopened to Closed

Note 13 patch is committed in r5605, thanks.

Updated by Hugo Ferreira over 15 years ago Actions #15

Thanks for the prompt reply Toshi.
Congrats for the excellent work; things feel much lively around here lately.

Actions

Also available in: PDF Atom