写导出 pdf 的时候发现设置下划线失效,于是想用画线来代替下划线,发现也没起作用,明明上次用画线都没问题 gem prawn 2.1.0
pdf = Prawn::Document.new(
page_size: 'A4',
page_layout: :portrait,
left_margin: 50,
right_margin: 50,
top_margin: 60,
bottom_margin: 30,
background: 'public/xxxx.jpg',
background_scale: 0.239
)
pdf.canvas do
pdf.line_width = 0.2
pdf.line([0, 0], [400, 400])
end
pdf.text(
'下划线测试',
align: :center,
size: 20,
leading: 20,
styles: [:underline]
)