How To Fix Prawn Line Not Rendering

Posted by Weston Ganger

I was struggling with the issue of a pdf.line that wasnt showing up in my prawn pdf. Some were working and some werent.

The trick is to change it use stroke_line

# Change This Line
pdf.line [20, pdf.cursor], [100, pdf.cursor]

# To This
pdf.stroke_line [20, pdf.cursor], [100, pdf.cursor]

On reason you may have tried this is because the documentation link that comes up when you Google ‘prawn’ is not up to date. Make sure your reading the latest documentation or manual for prawn.

Related External Links:

Article Topic:Software Development - Rails

Date:March 03, 2016

Recommended Posts



Send Me A Message

I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.

Get Connected