Class: LabelPrinter
- Inherits:
-
ActionPrinter
- Object
- ActionView::Base
- ActionPrinter
- LabelPrinter
- Defined in:
- lib/oxen_printer/label_printer.rb
Instance Attribute Summary
Attributes inherited from ActionPrinter
Instance Method Summary collapse
-
#do_render(print_job) ⇒ Object
IKKE FÆRDIG.
Methods inherited from ActionPrinter
#build_print_cmd, #command, #command=, #do_print, #file_path, #get_file_type, #html_file, #initialize, #label_file_path, #logit, #mail_print, #pdf_file_path, #print_print, #render_string_in, #send_print_file, #text_file
Constructor Details
This class inherits a constructor from ActionPrinter
Instance Method Details
#do_render(print_job) ⇒ Object
IKKE FÆRDIG
3 4 5 6 7 8 9 10 |
# File 'lib/oxen_printer/label_printer.rb', line 3 def do_render(print_job) path = print_job.view_template.path locals = { resource_class: print_job.entity.constantize, collection: print_job.entity.constantize.find_by_sql( print_job.resources_sql) } of = html_file render_to_string( path, locals: locals ) %x[ java -jar lib/java_pdf/barcodeprinter.jar #{of.path} #{pdf_file_path} ] rescue false end |