PDF via wkhtmltopdf: put user-specified options last.
Certain options (e.g. "cover") need to come after flags on the command line. Closes #6171.
This commit is contained in:
parent
2c09b15b8d
commit
43711ade22
1 changed files with 2 additions and 2 deletions
|
@ -142,7 +142,7 @@ makeWithWkhtmltopdf program pdfargs writer opts doc@(Pandoc meta _) = do
|
|||
(return . literal . stringify)
|
||||
meta
|
||||
let toArgs (f, mbd) = maybe [] (\d -> ["--" <> f, T.unpack d]) mbd
|
||||
let args = pdfargs ++ mathArgs ++ concatMap toArgs
|
||||
let args = mathArgs ++ concatMap toArgs
|
||||
[("page-size", getField "papersize" meta')
|
||||
,("title", getField "title" meta')
|
||||
,("margin-bottom", Just $ fromMaybe "1.2in"
|
||||
|
@ -155,7 +155,7 @@ makeWithWkhtmltopdf program pdfargs writer opts doc@(Pandoc meta _) = do
|
|||
(getField "margin-left" meta'))
|
||||
,("footer-html", getField "footer-html" meta')
|
||||
,("header-html", getField "header-html" meta')
|
||||
]
|
||||
] ++ pdfargs
|
||||
source <- writer opts doc
|
||||
verbosity <- getVerbosity
|
||||
liftIO $ html2pdf verbosity program args source
|
||||
|
|
Loading…
Reference in a new issue