mirror of
https://github.com/lloeki/tilt-pdf.git
synced 2025-12-06 10:34:41 +01:00
handle some pdfkit options at top level
This commit is contained in:
parent
bc91aa7012
commit
51e319dca1
1 changed files with 12 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue