问题
I want to draw borders for all the pages in my PDF. But while using stroke_bounds
, I can only draw single dark lined borders alone. I couldn't customize anything?
Does anybody have any idea on how to change the style of my stroke_bounds
borders?
回答1:
Use dash
in Prawn::Graphics::Dash
http://prawn.majesticseacreature.com/docs/0.11.1/Prawn/Graphics/Dash.html
example:
pdf.dash 10, :space => 4
pdf.stroke_bounds
回答2:
I had the same problem. I found out that you can use the "stroke_color" function to change this color.
http://prawnpdf.org/docs/0.11.1/Prawn/Graphics/Color.html#method-i-stroke_color
stroke_color "FF0000"
stroke_bounds
来源:https://stackoverflow.com/questions/3958262/is-there-any-options-to-customize-stroke-bounds-rails-prawn