有没有办法在不安装的情况下引用 ghostscript DLL?

Is there way to refer ghostscript's DLLs without installing?

我正在使用 Magick.NET 将图像(.PS 格式转换为 .PNG),内部 Magick.NET 使用 Ghostscript 转换 .ps 文件。有没有办法在不安装的情况下添加对 Ghostscript 的 DLL 的引用。 PS:我正在使用 ASP.NET MVC4

Ghostscript应该可以不用安装就可以使用。您应该先在自己的机器上下载并安装 Ghostscript。如果您想使用 Magick.NET 的 x64 版本,您应该安装 Ghostscript 的 x64 版本。您需要安装它,因为您需要将文件 gsdll64.dll 或 gsdll32.dll 复制到您的应用程序。我没有对此进行测试,因此您可能必须在它工作之前将 dll 复制到您的 bin 目录中。您可以尝试先将其放在 bin 目录之外。

在您的应用程序中使用 Magick.NET 之前,请确保执行以下调用:

MagickNET.SetGhostscriptDirectory(@"c:\directory\where\you\put\the\dll\of\ghostscript");