Use --enable-local-file-access in invoking wkhtmltopdf.

wkhtmltopdf changed in recent versions to require this for
access to local files.

This fixes PDF via HTML5 with `--css`.

Closes #6474.
This commit is contained in:
John MacFarlane 2020-06-22 16:33:20 -07:00
parent 064303e2c9
commit 76fc51f2ba

View file

@ -153,7 +153,8 @@ 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
] ++ ("--enable-local-file-access" : pdfargs)
-- see #6474
source <- writer opts doc
verbosity <- getVerbosity
liftIO $ html2pdf verbosity program args source