jordanbyron/prawn-labels

Cannot use image() within a label

Closed this issue · 2 comments

My label design uses a background image and some tables. I cannot use image() even when I refer to it explicitly via Prawn::Images.image(). I have the same issue with table-related calls like make_cell(), make_table() and table(). How can I use these features when creating a label?

Jack.

Jack,

I'm not sure why you can't include images in your labels. Take a look at this very simple example:

https://github.com/jordanbyron/prawn-labels/blob/master/examples/image_labels.rb

Does that help?

Yes, that helped. My code calls a subroutine, and I was not passing 'pdf' to the subroutine. Passing pdf and replacing image() with pdf.image() made everything work again. Sorry about that!

Jack.