プロジェクト

全般

プロフィール

Vote #75838

未完了

PDF Export sets table width as 100% by default

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

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
PDF export_39
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
39
version_id:
0
issue_org_id:
18630
author_id:
54354
assigned_to_id:
0
comments:
1
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
81
ステータス-->[New]

説明

The new PDF gem sets unspecified table widths to 100%.

Please see attached screenshots.

This seems to be the relevant code.


# /usr/lib/ruby/gems/1.9.1/gems/rbpdf-1.18.2/lib/rbpdf.rb

3721 # [@param float :w] Width of cells. If 0, they extend up to the right margin of the page.
3764 def MultiCell(w, h, txt, border=0, align='J', fill=0, ln=1, x='', y='', reseth=true, stretch=0, ishtml=false, autopadding=true, maxh=0)

11964 # table width
11965 if !dom[key]['width'].nil?
11966  table_width = getHTMLUnitToUnits(dom[key]['width'], wtmp, 'px')
11967 else
11968  table_width = wtmp
11969 end

11995 table_columns_width = table_width - (cellspacing * (dom[table_el]['cols'] - 1))
11996 wtmp = colspan * (table_columns_width / dom[table_el]['cols']) + (colspan - 1) * cellspacing
11997 if !dom[key]['width'].nil?
11998   cellw = getHTMLUnitToUnits(dom[key]['width'], table_columns_width, 'px')
11999 else
12000   cellw = wtmp
12001 end

12089 MultiCell(cellw, cellh, cell_content, 0, lalign, 0, 2, '', '', true, 0, true)

journals

I have created issue.
https://github.com/naitoh/rbpdf/issues/6
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリPDF export_39 にセット

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

いいね!0
いいね!0