Patch #10464 » pdf-issues-alignment.diff
| lib/redmine/export/pdf.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
end
|
||
|
# calculate columns alignment
|
||
|
@col_align = col_width.map {|x| x > table_width / (col_width.count + 1) ? 'L' : 'C'}
|
||
|
col_width
|
||
|
end
|
||
| ... | ... | |
|
# Renders MultiCells and returns the maximum height used
|
||
|
def issues_to_pdf_write_cells(pdf, col_values, col_widths,
|
||
|
row_height, head=false)
|
||
|
@col_align ||= []
|
||
|
base_y = pdf.GetY
|
||
|
max_height = row_height
|
||
|
col_values.each_with_index do |column, i|
|
||
|
col_x = pdf.GetX
|
||
|
if head == true
|
||
|
pdf.RDMMultiCell(col_widths[i], row_height, column.caption, "T", 'L', 1)
|
||
|
pdf.RDMMultiCell(col_widths[i], row_height, column.caption, "T", 'C', 1)
|
||
|
else
|
||
|
pdf.RDMMultiCell(col_widths[i], row_height, column, "T", 'L', 1)
|
||
|
@col_align[i] = 'L' if @col_align[i].nil?
|
||
|
pdf.RDMMultiCell(col_widths[i], row_height, column, "T", @col_align[i], 1)
|
||
|
end
|
||
|
max_height = (pdf.GetY - base_y) if (pdf.GetY - base_y) > max_height
|
||
|
pdf.SetXY(col_x + col_widths[i], base_y);
|
||
- « Previous
- 1
- …
- 8
- 9
- 10
- Next »