-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
convert file.pdf file.png
does not work on Windows (because of a Ghostscript mismatch)
#198
Comments
convert file.pdf file.png
requires Ghostscriptconvert file.pdf file.png
does not work on Windows (because of a Ghostscript mismatch)
So, Ghostscript is now packaged https://juliahub.com/ui/Packages/Ghostscript_jll/A26Vb/9.53.3+0
To perform a conversion one needs both gs() do gsbin
imagemagick_convert() do bin
run(`$bin input.pdf output.png`)
end
end However, on Windows the following exception arises inside of convert:
I think this is a problem with the Here are test runs that show this code running on Linux and Mac, but not on Windows: https://github.com/Krastanov/Quantikz/runs/2048488216 Any insight and suggestions on where to debug would be greatly appreciated! Is this as simple as adding |
This comment has been minimized.
This comment has been minimized.
Sigh, I was wrong in the above comment. The only reason FileIO worked was because I have ghostscript installed on my local machine. CI tests still fail. Ghostscript_jll solves this for Linux and Mac, but I am still open to suggestions for how to do it on Windows. |
Here is a simplified version of the bug report:
However, with using Ghostscript_jll
gs() do bin # adds gs to the PATH
load("file.pdf")
end The issue is that it works only on Mac and Linux. On Windows, the convert.exe command fails to find the delegate file (as shown in the detailed error message in a previous comment). This can also be seen in these CI logs https://github.com/Krastanov/Quantikz/runs/2048843301 |
I was able to run
Here is the CI log for
https://github.com/Krastanov/Quantikz/pull/1/checks?check_run_id=2049224946 |
A workaround might be to stop worrying about ImageMagick_jll and just use Ghostscript_jll directly when converting a pdf to other formats (ImageMagick does not really do anything here anyway https://stackoverflow.com/a/36137513 ). |
Edit: Ghostscript is now packaged and
convert file.pdf file.png
works on most platforms.Original Message:
I was pleased to see that
convert
fromImageMagic_jll
is so easy to use from inside of Julia. However, for converting pdf to png, it shells out togs
. I am attempting to packagegs
withBinaryBuilder
. I am a novice into this and given thatgs
would be of use to this package, I was hoping someone could help me with fleshing out the various issues with thegs
package. Here is a link to the currentbuild_tarballs
pull request: JuliaPackaging/Yggdrasil#2646The text was updated successfully, but these errors were encountered: