From 2b5dad9912de659424246657c91f70417590c3fe Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 2 Jun 2021 10:42:22 -0600 Subject: Fix regression in 2.14 for generation of PDFs with SVGs. Closes #7344. --- 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 6f462aad5..7fce17cea 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -202,7 +202,7 @@ convertImage opts tmpdir fname = do Just "image/svg+xml" -> E.catch (do (exit, _) <- pipeProcess Nothing "rsvg-convert" ["-f","pdf","-a","--dpi-x",dpi,"--dpi-y",dpi, - "-o",pdfOut,fname] BL.empty + "-o",pdfOut,svgIn] BL.empty if exit == ExitSuccess then return $ Right pdfOut else return $ Left "conversion from SVG failed") @@ -217,6 +217,7 @@ convertImage opts tmpdir fname = do where pngOut = replaceDirectory (replaceExtension fname ".png") tmpdir pdfOut = replaceDirectory (replaceExtension fname ".pdf") tmpdir + svgIn = tmpdir fname mime = getMimeType fname doNothing = return (Right fname) -- cgit v1.2.3