diff options
author | newmana <andrewfnewman@gmail.com> | 2018-01-10 13:58:35 +1000 |
---|---|---|
committer | newmana <andrewfnewman@gmail.com> | 2018-01-10 13:58:35 +1000 |
commit | 6b40b8c27c71231607e64221a071d3a2d366dce3 (patch) | |
tree | e18e14ff46ec486fb31f961fdd96deadef5a6da4 | |
parent | 13f7c2cf83c74c3dd22f355111d856fbfe7d3378 (diff) | |
download | pandoc-6b40b8c27c71231607e64221a071d3a2d366dce3.tar.gz |
Add header and footer parameters
-rw-r--r-- | MANUAL.txt | 4 | ||||
-rw-r--r-- | src/Text/Pandoc/PDF.hs | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/MANUAL.txt b/MANUAL.txt index 933a5e8f1..6e0920888 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -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` diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index 974934763..5f41d6c55 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -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 |