From 76fc51f2bae6c5c1a0d5abf60d84d24a3a603ebc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 22 Jun 2020 16:33:20 -0700 Subject: 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. --- src/Text/Pandoc/PDF.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index 02894aa0d..7dc0b1671 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -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 -- cgit v1.2.3