Quantcast
Channel: magick Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1011

Commented Unassigned: Not finding Ghostscript? [1203]

$
0
0
I installed the latest verson of Ghostscript (took defaults), as recommend in the docs here: (https://magick.codeplex.com/wikipage?title=Convert%20PDF&referringTitle=Documentation)

This code fails with the following error:

```
// "document" is a byte[] of a pdf, already read from disk elsewhere
// preprocess doc into bitmap
MagickReadSettings settings = new MagickReadSettings();
settings.Density = new MagickGeometry(600, 600);

var ms = new MemoryStream();

using (MagickImageCollection images = new MagickImageCollection())
{
images.Read(document, settings);

MagickImage vertical = images.AppendVertically();
vertical.Write(ms);
}
```

Error is:

```
ImageMagick.MagickDelegateErrorException: Magick: Postscript delegate failed `C:\Users\JAMIE~1.TIL\AppData\Local\Temp\magick-106767tiLZ5l001zR': No such file or directory @ error/pdf.c/ReadPDFImage/713
Result StackTrace:
at ImageMagick.MagickImageCollection.HandleReadException(MagickException exception)
at ImageMagick.MagickImageCollection.Read(Byte[] data, MagickReadSettings readSettings)
[...]
```

I could use some help figuring out why the Postscript delegate fails. Is there some undocumented thing I have to do to help Magick.NET find Ghostscript?

A quick observation: The temp file mentioned in the error is not there, but another temp file is created when I run the code. It is 0 bytes long. I have confirmed via debug that the byte[] being passed in is not empty.
Comments: ** Comment from web user: jptillman **

I think I fixed my own problem. I found this issue posting:
https://magick.codeplex.com/workitem/963

...which mentions that an existing installation of 64-bit Ghostscript will cause a 32-bit execution of Magick.NET to fail in finding Ghostscript. I had performed 64 & 32 installations in the hopes of catching all the possibilities.

I uninstalled the 64 bit (left the 32 bit I also had installed) and my code started working.

It may be good to update the docs about this particular issue, because even the mention of 64 vs. 32 bit is vague and I didn't catch on to what was needed.


Viewing all articles
Browse latest Browse all 1011

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>