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

Version Path
rails_app_generator-0.3.6 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.3.5 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.3.4 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.3.3 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.3.2 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.3.1 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.3.0 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.43 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.42 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.41 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.40 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.39 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.38 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.37 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.36 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.35 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.34 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.33 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.32 after_templates/addons/hexapdf/app/controllers/home_controller.rb
rails_app_generator-0.2.31 after_templates/addons/hexapdf/app/controllers/home_controller.rb