git.iko.soy/typeable/pandoc
on master help sign in
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.

commit76fc51f2bae6c5c1a0d5abf60d84d24a3a603ebc authorJohn MacFarlane <jgm@berkeley.edu> dateMon 22 Jun 2020, 16:33 (6 years ago) parent064303e
1 file changed+2−1
src/Text/Pandoc/PDF.hs+2−1
src/Text/Pandoc/PDF.hs+2−1
@@ -153,7 +153,8 @@ makeWithWkhtmltopdf program pdfargs writer opts doc@(Pandoc meta _) = do
153153 (getField "margin-left" meta'))
154154 ,("footer-html", getField "footer-html" meta')
155155 ,("header-html", getField "header-html" meta')
156− ] ++ pdfargs
156+ ] ++ ("--enable-local-file-access" : pdfargs)
157+ -- see #6474
157158 source <- writer opts doc
158159 verbosity <- getVerbosity
159160 liftIO $ html2pdf verbosity program args source