プロジェクト

全般

プロフィール

Vote #69023

完了

Error with PDF output and ruby 1.9.2

Admin Redmine さんがほぼ4年前に追加. ほぼ4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Ruby support_33
対象バージョン:
開始日:
2011/01/19
期日:
進捗率:

0%

予定工数:
category_id:
33
version_id:
27
issue_org_id:
7373
author_id:
26897
assigned_to_id:
0
comments:
2
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
20
ステータス-->[Closed]

説明

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[c[0]]

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?


journals

Sorry, code in preformatted tags
<pre>
l=l+cw[c[0]]
</pre>
--------------------------------------------------------------------------------
1.1.0 is not compatible with ruby1.9.2 but this error is fixed in trunk.
--------------------------------------------------------------------------------


related_issues

relates,Closed,61,Broken character encoding in pdf export

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0