Class: PetitFelix::Task::TemplatePDFTask
- Inherits:
-
DefaultTask
- Object
- DefaultTask
- PetitFelix::Task::TemplatePDFTask
- Defined in:
- lib/task/template_pdf_task.rb
Class Method Summary collapse
-
.default_options ⇒ Object
Default options of the application.
- .name ⇒ Object
Instance Method Summary collapse
Methods inherited from DefaultTask
#prepare_options, #render_files
Class Method Details
.default_options ⇒ Object
Default options of the application
17 18 19 20 21 22 23 24 25 |
# File 'lib/task/template_pdf_task.rb', line 17 def self. return { "template" => (File.join(File.dirname(__FILE__),"..","..","templates","test.json")), "output_file" => "test.pdf", "right_to_left" => false } end |
.name ⇒ Object
10 11 12 13 14 |
# File 'lib/task/template_pdf_task.rb', line 10 def self.name "template-pdf" end |
Instance Method Details
#render_zine ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/task/template_pdf_task.rb', line 27 def render_zine # Only continue if metadata has a title # Generates PDF pdf = PetitFelix::Worker::TemplatePDFWriter.new( page_layout: ["page_layout"], print_scaling: ["print_scaling"]) pdf. , override_options: pdf.init_values , pdf pdf.read_template # Outputs to file pdf.output end |