Tintin81 Tintin81 - 1 year ago 110
Ruby Question

How to set the color of a horizontal line in Prawn?

How can I set the color of a

in Prawn PDF?

This is what I've got:

horizontal_line 0, 540, :at => line

It seems this is nowhere documented in the manual.

Thanks for any help.

Answer Source

If I remember correctly you can use stroke_color to set the color on a line like:

    mypdf.stroke_color "f0ffc1"


    mypdf.stroke_color 0,0,0,0 // for CMYK

Hope it helps!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download