Skip to content

Commit

Permalink
crop drawio conversions (#179)
Browse files Browse the repository at this point in the history
drawio needs --crop now in order to trim diagrams to their actual size

* crop drawio conversions

* make trivial change to drawio image
  • Loading branch information
chrisfenner authored Sep 11, 2024
1 parent 1e1207c commit 8f79b56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion filter/convert-images.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ end
-- https://github.com/jgraph/drawio-desktop/issues/249
function drawio(source, dest)
print(string.format('converting %s using drawio...', source))
if not runCommandSuppressOutput(string.format("xvfb-run -a drawio -x -f pdf -o %s %s --no-sandbox 2>&1", dest, source)) then
if not runCommandSuppressOutput(string.format("xvfb-run -a drawio -x -f pdf --crop -o %s %s --no-sandbox 2>&1", dest, source)) then
print(string.format('failed to convert %s to %s using drawio, falling back to letting latex try to pick it up', source, dest))
return false
end
Expand Down
14 changes: 7 additions & 7 deletions sample.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8f79b56

Please sign in to comment.