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

Version Path
rails_app_generator-0.2.18 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.17 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.16 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.15 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.14 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.13 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.12 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.11 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.10 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.9 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.8 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.7 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.6 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.5 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.4 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.3 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.2 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.1 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.0 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.1.28 after_templates/addons/hexapdf/app/controllers/home_controller.rb