Patch #10464
closedEnhanced PDF output for Issues list
0%
Description
Improvements:
1. Automatic calculation of the size of table columns depending on their content.
2. Automatic detection of columns alignment.
3. Output table header on each page.
Files
Related issues
Updated by Yuri Makarov almost 13 years ago
- File example-1.pdf example-1.pdf added
- File example-2.pdf example-2.pdf added
- File example-3.pdf example-3.pdf added
Updated by Toshi MARUYAMA almost 13 years ago
- File pdf-r9240.diff pdf-r9240.diff added
This is a patch rebased on trunk r9240.
Updated by Toshi MARUYAMA almost 13 years ago
- File issues-pdf-r9244.diff issues-pdf-r9244.diff added
This is a full patch for r9244 which fixes conflict and source indents.
Updated by Toshi MARUYAMA almost 13 years ago
- File grouped-issues.pdf grouped-issues.pdf added
- File first-row.png first-row.png added
Note 3 patch first row of second page height is broken.
Updated by Yuri Makarov almost 13 years ago
I can't test it now, my Redmine at work.
Some comments:
1. Comparing the diff's, I see in my pdf.rb line:
cv = issue.custom_values.detect {| v | ....
your version should be?:
cv = issue.custom_field_values.detect {| v | ....
2. Calculate the length of the text in my diff is based on the font page header. This is not correct. It almost does not affect the result, but leads to an increase in long columns of text. To correct this, use in def calc_col_width:
...
# by captions
pdf.SetFontStyle('B',8)
...
# by properties of issues
pdf.SetFontStyle('',8)
...
In this case, it may be necessary to add a constant of the column width for padding around the text, such as 5 mm.
col_padding = 5
col_width_min = query.columns.map {|v| pdf.GetStringWidth(v.caption) + col_padding}
...
x = pdf.GetStringWidth(w) + col_padding
...
n = pdf.GetStringWidth(v.rstrip) + col_padding
...
x = pdf.GetStringWidth(w) + col_padding
Updated by Toshi MARUYAMA almost 13 years ago
Please create a patch to the trunk.
I rebased your patch to the trunk.
Updated by Yuri Makarov almost 13 years ago
I can make a patch only tomorrow at work.
About first row of second page ..
Change from (about line 333 in trunk):
# make new page if it doesn't fit on the current one space_left = page_height - base_y - bottom_margin if max_height > space_left pdf.AddPage("L") base_x = pdf.GetX base_y = pdf.GetY render_table_header(pdf, query, col_width, row_height, col_id_width, table_width) end
To:
# make new page if it doesn't fit on the current one space_left = page_height - base_y - bottom_margin if max_height > space_left pdf.AddPage("L") render_table_header(pdf, query, col_width, row_height, col_id_width, table_width) base_x = pdf.GetX base_y = pdf.GetY end
This should fix the result.
Updated by Toshi MARUYAMA almost 13 years ago
- File pdf-issues-alignment.diff pdf-issues-alignment.diff added
- Status changed from New to Closed
- Target version set to 1.4.0
I committed r9246 to the trunk.
This commit is removed auto alignment.
I attach a patch for auto alignment.
I do not see the reason to change alignment.