Add header and footer parameters

This commit is contained in:
newmana 2018-01-10 13:58:35 +10:00
parent 13f7c2cf83
commit 6b40b8c27c
2 changed files with 6 additions and 2 deletions

View file

@ -200,8 +200,8 @@ PDF output can be controlled using [variables for LaTeX] (if
LaTeX is used) and [variables for ConTeXt] (if ConTeXt is used).
When using an HTML/CSS-to-PDF-engine, `--css` affects the output.
If `wkhtmltopdf` is used, then the variables `margin-left`,
`margin-right`, `margin-top`, `margin-bottom`, and `papersize`
will affect the output.
`margin-right`, `margin-top`, `margin-bottom`, `footer-html`,
`header-html` and `papersize` will affect the output.
To debug the PDF creation, it can be useful to look at the intermediate
representation: instead of `-o test.pdf`, use for example `-s -o test.tex`

View file

@ -104,6 +104,10 @@ makePDF "wkhtmltopdf" pdfargs writer opts doc@(Pandoc meta _) = do
(getField "margin-right" meta'))
,("margin-left", fromMaybe (Just "1.25in")
(getField "margin-left" meta'))
,("footer-html", fromMaybe Nothing
(getField "footer-html" meta'))
,("header-html", fromMaybe Nothing
(getField "header-html" meta'))
]
source <- writer opts doc
verbosity <- getVerbosity