如何使用GS_THREADSAFE选项调用Ghostscript API [英] How to use GS_THREADSAFE option for invoking Ghostscript API

查看:74
本文介绍了如何使用GS_THREADSAFE选项调用Ghostscript API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Am使用Ghostscript API通过C#将PDF转换为Image(Tiff),但一次仅支持一个实例.

Am using Ghostscript API for converting PDF to Image(Tiff) using C#, but only one instance at a time is supported.

如果使用GS_THREADSAFE定义编译Ghostscript,则允许多个并发实例.文档: http://www.ghostscript.com/doc/current/API.htm

if Ghostscript is compiled with the GS_THREADSAFE define then multiple concurrent instances are permitted. documentation: http://www.ghostscript.com/doc/current/API.htm

请协助我,如何使用GS_THREADSAFE选项调用GhostScript APi.任何示例代码都将受到赞赏.

Kindly assist me, how i can invoke GhostScript APi with GS_THREADSAFE option. Any sample code is appreciated.

谢谢

推荐答案

我不太了解您的问题.您可以使用GS_THREADSAFE编译器定义来编译Ghostscript.然后,您可以根据需要单独的实例多次调用gs_api_new_instance().

I don't really understand your question. You compile Ghostscript with the GS_THREADSAFE compiler definition. Then you can call gs_api_new_instance() as many times as you require separate instances.

可以为每个实例提供不同的输入.

Each instance can be fed a different input.

对我来说,为什么您会费心拥有多个实例仍然不是很清楚.

Its not obvious to me why you would bother having multiple instances though.

这篇关于如何使用GS_THREADSAFE选项调用Ghostscript API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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