Sha256: 9f60de11bfd2d3f58cd06546ea4ed7b9af0197d6eefd1bb50de2e78cc3881917
Contents?: true
Size: 787 Bytes
Versions: 4
Compression:
Stored size: 787 Bytes
Contents
module Parade module PDFPresentation def self.included(server) server.get '/pdf' do # TODO: Find the presentation file and/or regenerate it every time template_options = { 'erb_template_file' => File.join(File.dirname(__FILE__), "..", "..", "views", "pdf.erb"), 'custom_asset_path' => settings.presentation_directory, 'slides' => slides } html_content = TemplateGenerator.new(template_options).render # TODO the image references here are not full filepaths. creating issues kit = PDFKit.new(html_content,:page_size => 'Letter', :orientation => 'Landscape') send_file kit.to_file('presentation.pdf') end end end end
Version data entries
4 entries across 4 versions & 1 rubygems