简体   繁体   English

当多个用户同时访问ghostscript pdf到图像转换器时,结果将是什么?

[英]what will be the result when more than one user simultaneously access the ghostscript pdf to image converter

I 'm using ghostscript pdf to image conversion 'using Cyotek.GhostScript.PdfConversion;' 我正在使用ghostscript pdf进行图像转换,“使用Cyotek.GhostScript.PdfConversion;” 'using Cyotek.GhostScript;' “使用Cyotek.GhostScript;” in my webproject it works well when processing single request at a time, but when it process more than one request simultaneously it produce error like 'Failed to process GhostScript command.' 在我的Web项目中,一次处理单个请求时效果很好,但是当同时处理多个请求时,会产生类似“无法处理GhostScript命令”的错误。 my project is a web project here more than one process the website how can i solve this problem i'm helpless please help me. 我的项目是一个Web项目,这里不止一个过程,网站如何解决这个问题,我很无奈,请帮助我。

If you are not using Ghostscript via command line (Process.Start), unless native Ghostscript library has been compiled with the GS_THREADSAFE define, only one instance at a time (per process) is supported. 如果您不是通过命令行(Process.Start)使用Ghostscript,除非使用GS_THREADSAFE定义编译了本机Ghostscript库,否则一次(每个进程)仅支持一个实例。 This means you can process only 1 pdf at a time. 这意味着您一次只能处理1个pdf。 I believe Cyotek.GhostScript uses Ghostscript API and your native Ghostscript library is compiled without the GS_THREADSAFE. 我相信Cyotek.GhostScript使用Ghostscript API,并且您的本机Ghostscript库是在没有GS_THREADSAFE的情况下编译的。

Eventually you could try to use Ghostscript.NET which has ability to load native Ghostscript library from the memory. 最终,你可以尝试使用Ghostscript.NET它必须从内存中加载本地的Ghostscript库的能力。 That way you can have multiple instances of the native Ghostscript library running at a same time each one in it's own context within a same process. 这样,您可以让本机Ghostscript库的多个实例同时运行,每个实例都在同一进程中的各自上下文中运行。 (without a need for GS_THREADSAFE). (无需GS_THREADSAFE)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM