git.iko.soy/typeable/pandoc
on master help sign in
Fix regression in 2.14 for generation of PDFs with SVGs.

Closes #7344.

commit2b5dad9912de659424246657c91f70417590c3fe authorJohn MacFarlane <jgm@berkeley.edu> dateWed 2 Jun 2021, 10:42 (5 years ago) parent3b628f7
1 file changed+2−1
src/Text/Pandoc/PDF.hs+2−1
src/Text/Pandoc/PDF.hs+2−1
@@ -202,7 +202,7 @@ convertImage opts tmpdir fname = do
202202 Just "image/svg+xml" -> E.catch (do
203203 (exit, _) <- pipeProcess Nothing "rsvg-convert"
204204 ["-f","pdf","-a","--dpi-x",dpi,"--dpi-y",dpi,
205− "-o",pdfOut,fname] BL.empty
205+ "-o",pdfOut,svgIn] BL.empty
206206 if exit == ExitSuccess
207207 then return $ Right pdfOut
208208 else return $ Left "conversion from SVG failed")
@@ -217,6 +217,7 @@ convertImage opts tmpdir fname = do
217217 where
218218 pngOut = replaceDirectory (replaceExtension fname ".png") tmpdir
219219 pdfOut = replaceDirectory (replaceExtension fname ".pdf") tmpdir
220+ svgIn = tmpdir </> fname
220221 mime = getMimeType fname
221222 doNothing = return (Right fname)
222223