Class: Html2Pdf::Configuration
- Inherits:
-
Object
- Object
- Html2Pdf::Configuration
- Defined in:
- lib/html2pdf/configuration.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
rubocop:disable MethodLength.
Constructor Details
#initialize ⇒ Configuration
rubocop:disable MethodLength
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/html2pdf/configuration.rb', line 5 def initialize # see: http://wkhtmltopdf.org/usage/wkhtmltopdf.txt @options = { wkhtmltopdf: (defined?(Bundler::GemfileError) ? `bundle exec which wkhtmltopdf` : `which wkhtmltopdf`).chomp, page_settings: [ "--margin-top 4", "--margin-bottom 4", "--margin-left 4", "--margin-right 4", '--header-center "[webpage] :: [page]/[topage]"', "--header-spacing 1", "--header-font-size 8", "--header-line", "--footer-spacing 1", "--footer-font-size 8", "--footer-line" ] } end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
3 4 5 |
# File 'lib/html2pdf/configuration.rb', line 3 def @options end |