aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-06-02 10:42:22 -0600
committerJohn MacFarlane <jgm@berkeley.edu>2021-06-02 10:42:22 -0600
commit2b5dad9912de659424246657c91f70417590c3fe (patch)
tree17757f443891cf54e468a9b698d0795f14e92587 /src/Text/Pandoc
parent3b628f7664a95e6f3b3d7da177c83333ec2bc0fa (diff)
downloadpandoc-2b5dad9912de659424246657c91f70417590c3fe.tar.gz
Fix regression in 2.14 for generation of PDFs with SVGs.
Closes #7344.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/PDF.hs3
1 files changed, 2 insertions, 1 deletions
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)