Sha256: 4875e4dd389846ff6cf8a63c69fcdb7b4d5c972dff6127f75afa1dfaf1d1a8e1
Contents?: true
Size: 959 Bytes
Versions: 3
Compression:
Stored size: 959 Bytes
Contents
module Html2Pdf class << self # Customize the configuration for specific system (Ubuntu/OSX/etc) # See: ./lib/html2pdf/configuration.rb for available options # rubocop:disable MethodLength def update_config Html2Pdf.configure do |config| # Note: or add your own path here if `wkhtmltopdf` is not in the $PATH environment config.options[:wkhtmltopdf] = (defined?(Bundler::GemfileError) ? `bundle exec which wkhtmltopdf` : `which wkhtmltopdf`).chomp config.options[:page_settings] = [ "--margin-top 8", "--margin-bottom 8", "--margin-left 8", "--margin-right 8", '--header-center "[webpage] :: [page]/[topage]"', "--header-spacing 1", "--header-font-size 8", "--header-line", "--footer-spacing 1", "--footer-font-size 8", "--footer-line" ] end end # rubocop:enable All end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
html2pdf-0.2.6 | lib/html2pdf/config/html2pdf.rb |
html2pdf-0.2.5 | lib/html2pdf/config/html2pdf.rb |
html2pdf-0.2.4 | lib/html2pdf/config/html2pdf.rb |