Project

General

Profile

Actions

Defect #7373

closed

Error with PDF output and ruby 1.9.2

Added by Steve Fowler over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Ruby support
Target version:
Start date:
2011-01-19
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Ruby version 1.9.2 (i386-mingw32)
RubyGems version 1.3.7
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Application root C:/Ruby/redmine
Environment production
Database adapter postgresql 8.2
Database schema version 20101114115359

When exporting an issue to PDF we are getting a string to integer error

TypeError (can't convert String into Integer):
lib/redmine/export/pdf.rb:246:in `block in issue_to_pdf

I've tracked the problem down to the MultiCell command, if I change it to Cell then it works OK but only prints on a single line.

After a little digging around I found the MutliCell command in the fpdf.rb file. I tracked the problem down to the following command

l=l+cw[c0]

I'm no Ruby developer so I wasn't sure of the fix but I could understand what it was trying to do, so I change the line to the following

l=l+500

I appreciate this will not fill the width of the document but its pretty close.

Is there a "proper" fix?


Related issues

Related to Redmine - Defect #61: Broken character encoding in pdf exportClosedToshi MARUYAMA

Actions
Actions

Also available in: Atom PDF