This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'prawn/qrcode' | |
require 'prawn/measurement_extensions' | |
def generate_qr_code_and_render_in_pdf | |
pdf = Prawn::Document.new(page_size: [40.mm, 25.mm], margin: [10,10,10,10]) | |
pdf.font_size 8 | |
array = %w[Iron Joker John Joel Tim Hydra Phenix Nick Pokemon] | |
array.each do |row| | |
puts "generating QR code for: #{row}" | |
qrcode_content = row |