Vote #75840
完了PDF Export has no left padding for tables
0%
説明
@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
journals
I am trying to add export PDF option on one of the plugin screens. Can you help me where all i need to change to make it work?
--------------------------------------------------------------------------------
I have created issue.
https://github.com/naitoh/rbpdf/issues/7
--------------------------------------------------------------------------------
This problem fixed by rbpdf 1.18.5.
please bundle update
<pre>
bundle update rbpdf
</pre>
!rbpdf-1.18.5.png!
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Required rbpdf 1.18.5 in 2.6-stable r13987, thanks.
--------------------------------------------------------------------------------