New Discussion

Notifications

You’re not receiving notifications from this thread.

How to insert QRCode into PDF using receipts gem?

1
Rails

Hi!
I'm using receipts gem to generate pdf. Also I want to insert QRcode for the payment (for example into footer section).
Tell me please, is there any examples of doing so?
I want QRcode to consist of Partner attributes, like iban, money amount, etc. Like: charge.partner.iban

I trying to put qrcode = RQRCode::QRCode.new(self.partner.ico.to_s) and this png = qrcode.as_png to receipt method in Charge model
and somehow use it in the footer: footer: ActionController::Base.helpers.image_tag(png.to_data_url)
Maximum all I get is image in the form of the string

I got help on stackoverflow, but I can't post the link.

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 89,509+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.