Actions
Defect #18632
closedPDF Export has no left padding for tables
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
rbpdf.png
: This is the default export. There is no visible left padding in the generated PDF. This leads to pretty ugly PDF tables.# /usr/lib/ruby/gems/1.9.1/gems/rbpdf-1.18.2/lib/rbpdf.rb 3814 starty = @y 3815 if autopadding 3816 # Adjust internal padding 3817 if @c_margin < (@line_width / 2) 3818 @c_margin = @line_width / 2 3819 end 3820 # Add top space if needed 3821 if (@lasth - @font_size) < @line_width 3822 @y += @line_width / 2 3823 end 3824 # add top padding 3825 @y += @c_margin 3826 end
rbpdf-with-left-padding.png
: Adding the following leads to a better left-padding default.# /usr/lib/ruby/gems/1.9.1/gems/rbpdf-1.18.2/lib/rbpdf.rb 3814 starty = @y 3815 if autopadding 3816 # Adjust internal padding 3817 if @c_margin < (@line_width / 2) 3818 @c_margin = @line_width / 2 3819 end 3820 # Add top space if needed 3821 if (@lasth - @font_size) < @line_width 3822 @y += @line_width / 2 3823 end +3824 # add left padding +3825 @x += @line_width * 2 3826 # add top padding 3827 @y += @c_margin 3828 end
Files
Actions