Sha256: 21b2535760b2f391b30ae438cf9132707515826b934a0825a3b16974423613a0
Contents?: true
Size: 356 Bytes
Versions: 26
Compression:
Stored size: 356 Bytes
Contents
class HomeController < ApplicationController def index end def make_pdf doc = HexaPDF::Document.new canvas = doc.pages.add.canvas canvas.font('Helvetica', size: 40) name = Faker::Name.name canvas.text("Hello #{name}", at: [20, 400]) doc.write("hello-sean.pdf") flash.notice = "PDF Created!" render :index end end
Version data entries
26 entries across 26 versions & 1 rubygems