如何在“服务器模式"下使用Ghostscript API?使用VB或C#转换文件? [英] How can I use Ghostscript API in "server mode" to convert files using VB or C# ?

查看:101
本文介绍了如何在“服务器模式"下使用Ghostscript API?使用VB或C#转换文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用GhostScript API分别转换PostScript文件,但是最新版本的Ghostscript 9.06允许服务器模式",这意味着GS解释器可以加载一次,执行多次转换,最后退出GS Interpreter .在此服务器模式"之前,每次文件转换都必须加载和卸载GS Interpreter.
您知道如何使用VB或C#为GhsotScript API实现服务器模式"吗?
感谢您提供有关执行此操作的任何线索.
Jaime

I have used the GhostScript API to convert PostScript files individually, but the latest version 9.06 of Ghostscript permits "server mode" which means that the GS interpreter can be loaded once, perform multiple conversions and finally exit the GS Interpreter at the end. Before this "server mode", the GS Interpreter had to be loaded and unloaded for each file conversion.
Do you know how to implement "server mode" for the GhsotScript API using VB or C# ?
Thanks for any clues on how to do this.
Jaime

推荐答案

我认为此服务器模式"仅表示pdfwrite设备现在支持
-sOutputFile< outputfilename>%d.pdf参数中的%d标志.

这意味着pdfwrite设备在转换后会在内部关闭,因此您可以转换多页ps/pdf文档并保存单页.

我不认为这种服务器模式"允许您将多个多页ps/pdf转换为pdf,但是我不确定.

该文档指出:
pdfwrite服务器模式"-pdfwrite现在可以在服务器模式"下运行,它允许在不关闭解释器的情况下关闭设备.这意味着在开始新的PDF转换之前不再需要终止GS. 这将导致:

pdfwrite现在在OutputFile开关中支持%d"格式.如果设置了该选项,则pdfwrite会将输入的每一页输出到一个单独的文件.

再见,

托马斯.
I think this ''server mode'' means only, that the pdfwrite device now supports the
%d flag in the -sOutputFile <outputfilename>%d.pdf parameter.

That means the pdfwrite device is closed internally after a conversion, so that you can convert a multi-page ps/pdf document and save single pages.

I don''t think this ''server mode'' allows you to convert more than one multi-page ps/pdf to pdf, but I''m not sure.

The doc states:
pdfwrite "Server mode" - pdfwrite can now be run in "server mode" which allows the device to be closed without closing the interpreter. This means it is no longer necessary to terminate GS before starting a new PDF conversion. This leads on to:

pdfwrite now supports the "%d" format in the OutputFile switch. If this is set then pdfwrite will output each page of input to an individual file.

Bye,

Thomas.


这篇关于如何在“服务器模式"下使用Ghostscript API?使用VB或C#转换文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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