I am trying to generate PDFs with Prawn. Inside my PDF template I have tables with cells. In one of those cells I have an email address:
cell_email = pdf.make_cell(:content => booking.user_email, :border_width => 0)
I want to make email to link to "mailto" link. I know I can link some way like this:
pdf.formatted_text([{:text => booking.user_email, :link => "mailto: #{booking.user_email}"}])
However combining those two lines (giving formatted text as a content) doesn't work:
cell_email = pdf.make_cell(:content => pdf.formatted_text([{:text => booking.user_email, :link => "mailto: #{booking.user_email}"}]), :border_width => 0)
Any ideas how can I overcome this issue (create an email link inside the table cell)?
Kind Regards and Many Thanks!
table(data) do; cells.each { |c| c.inline_format = true if c.respond_to?(:inline_format) }; end
– Qualitative