Ask A Question


You’re not receiving notifications from this thread.

How to insert QRCode into PDF using receipts gem?

czepesch asked in Rails

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 = 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

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

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

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

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2023 GoRails, LLC. All rights reserved.