Sha256: f42fc1e4a20e8aaded7935ef5ad1bb0fa000db9c487cb4d0d41a1cf321a75d02
Contents?: true
Size: 355 Bytes
Versions: 32
Compression:
Stored size: 355 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-jin.pdf") flash.notice = "PDF Created!" render :index end end
Version data entries
32 entries across 32 versions & 1 rubygems