aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/PDF.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-03-02 15:26:11 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2020-03-02 15:26:11 -0800
commit43711ade22dfd90600a0b2bdfd04fd0936e4052b (patch)
tree6fb5683bb4fc908899d612d34f8b4de9e87ce50c /src/Text/Pandoc/PDF.hs
parent2c09b15b8dc421c444f732a7b1fbe9f67f80de45 (diff)
downloadpandoc-43711ade22dfd90600a0b2bdfd04fd0936e4052b.tar.gz
PDF via wkhtmltopdf: put user-specified options last.
Certain options (e.g. "cover") need to come after flags on the command line. Closes #6171.
Diffstat (limited to 'src/Text/Pandoc/PDF.hs')
-rw-r--r--src/Text/Pandoc/PDF.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs
index e0d1263f0..fac992c4e 100644
--- a/src/Text/Pandoc/PDF.hs
+++ b/src/Text/Pandoc/PDF.hs
@@ -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