handle some pdfkit options at top level

This commit is contained in:
Loic Nageleisen 2014-02-21 16:24:15 +01:00
parent bc91aa7012
commit 51e319dca1

View file

@ -98,7 +98,18 @@ module Tilt
end end
def pdfkit_options def pdfkit_options
config.fetch('pdfkit', {}) toplevel_options = %w[title
orientation
grayscale
page-size
margin-left
margin-right
margin-top
margin-bottom]
options = config.select { |k, _| toplevel_options.include?(k) }
options.merge config.fetch('pdfkit', {})
end end
def dirname def dirname