如何解决“Ghostscript.NET.GhostscriptLibraryNotInstalledException”在asp服务器上 [英] How to solve "Ghostscript.NET.GhostscriptLibraryNotInstalledException" on asp server

查看:544
本文介绍了如何解决“Ghostscript.NET.GhostscriptLibraryNotInstalledException”在asp服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ghostscript.NET.GhostscriptLibraryNotInstalledException:此托管库在64位进程下运行,需要在此计算机上安装64位Ghostscript本机库!要下载正确的Ghostscript本机库,请访问:http://www.ghostscript.com/download/gsdnld.html

at Ghostscript.NET.GhostscriptVersionInfo.GetLastInstalledVersion(GhostscriptLicense licenseType,GhostscriptLicense licensePriority)
at ShopAdmin.Controllers.DealsController.ConvertPdftoImages(String inputPdfPath,String PdffileName)

at ShopAdmin.Controllers.DealsController.PdfFileUpload(HttpPostedFileBase fileData)

解决方案

这里涉及2个dll。原生的(gsdll32.dll / gsdll64.dll)和托管的(Ghostscript.NET.dll)。托管的只是本机的一个包装器(这意味着托管的dll调用本机dll中的公开函数)。这表明系统上需要两个dll。



Ghostscript.NET的工作方式是根据进程动态加载本机Ghostscript库因此,如果它在64位进程中运行,它将加载gsdll64.dll,如果它在32位进程中运行,它将加载gsdll32.dll。通过查看注册表,Ghostscript.NET知道在哪里找到这些dll。



您将通过下载和获得本机Ghostscript dll(gsdll32.dll / gsdll64.dll)从http://www.ghostscript.com/download/gsdnld.html安装Ghostscript库。基于您下载并安装的本机Ghostscript库(32位/ 64位)(您可以同时安装),这就是:Native Ghostscript库安装程序将一些安装信息值写入注册表。这些值可以在以下位置找到:HKEY_LOCAL_MACHINE\SOFTWARE \ GPL Ghostscript。其中一个值是GS_DLL,它指向磁盘上的本机Ghostscript dll。通常,它指向:C:\Program Files \\\\gsv.vv \bin\gsdllxx.dll其中v.vv代表本机Ghostscript库版本,xx代表平台目标(32或64)。

Ghostscript.NET.GhostscriptLibraryNotInstalledException: This managed library is running under 64-bit process and requires 64-bit Ghostscript native library installation on this machine! To download proper Ghostscript native library please visit: http://www.ghostscript.com/download/gsdnld.html
at Ghostscript.NET.GhostscriptVersionInfo.GetLastInstalledVersion(GhostscriptLicense licenseType, GhostscriptLicense licensePriority)
at ShopAdmin.Controllers.DealsController.ConvertPdftoImages(String inputPdfPath, String PdffileName)
at ShopAdmin.Controllers.DealsController.PdfFileUpload(HttpPostedFileBase fileData)

解决方案

There are 2 dll's involved here. The native one ( gsdll32.dll / gsdll64.dll ) and the managed one ( Ghostscript.NET.dll ). The managed one is just a wrapper around the native one (which means, the managed dll calls exposed functions from the native dll). That makes a clue that both dll's are required on the system.

The Ghostscript.NET works in a way that it loads a native Ghostscript library dynamically based on the process it's running in. So, if it runs in the 64 bit process, it will load gsdll64.dll, if it runs in the 32 bit process it will load gsdll32.dll. Ghostscript.NET know where to find those dll's by looking into the registry.

You will get a native Ghostscript dll ( gsdll32.dll / gsdll64.dll ) by downloading and installing Ghostscript library from http://www.ghostscript.com/download/gsdnld.html. Based on native Ghostscript library you downloaded and installed ( 32bit / 64bit ) (you can have both installed) this is what happen: Native Ghostscript library installer writes some installation information values into the registry. Those values can be found at: "HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript". One of this values is a GS_DLL which points to the native Ghostscript dll on the disk. Usually, it points to the: "C:\Program Files\gs\gsv.vv\bin\gsdllxx.dll" where v.vv stands for native Ghostscript library version and xx stands for platform target (32 or 64).


这篇关于如何解决“Ghostscript.NET.GhostscriptLibraryNotInstalledException”在asp服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆