Skip to content

Commit

Permalink
Merge pull request #67 from istathar/rsvg
Browse files Browse the repository at this point in the history
Change SVG to PDF conversion back to rsvg-convert
  • Loading branch information
istathar authored Nov 8, 2023
2 parents 4e3b409 + bb8d00c commit f6d361b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: publish
version: 2.5.4
version: 2.6.0
synopsis: Publishing tools for papers, books, and presentations
description: |
Tools for rendering markdown-centric documents into PDFs. There are two
Expand Down
12 changes: 7 additions & 5 deletions src/RenderDocument.hs
Original file line number Diff line number Diff line change
Expand Up @@ -445,18 +445,20 @@ convertImage file = do
basepath = dropExtension file
target = tmpdir ++ "/" ++ basepath ++ ".pdf"
buffer = tmpdir ++ "/" ++ basepath ++ "~tmp.pdf"
inkscape =
[ "inkscape"
, "--export-type=pdf"
, "--export-filename=" ++ buffer
convert =
[ "rsvg-convert"
, "--format"
, "pdf"
, "--output"
, buffer
, file
]

ifNewer file target $ do
debugS "target" target
(exit, out, err) <- do
ensureDirectory target
readProcess (fmap intoRope inkscape)
readProcess (fmap intoRope convert)

case exit of
ExitFailure _ -> do
Expand Down

0 comments on commit f6d361b

Please sign in to comment.