2014-09-25 103 views
0

我想使用ghostscript将PDF转换为图像。在C#中使用Process类非常简单。我想是使用gsdll32.lib或C#gsdll32.dll并能够执行以下命令,该命令使用gswin32cGhostscript与C#使用DLL

gs9.14\\bin\\gswin32c -Igs9.14\\lib;fonts -dSAFER -dNumRenderingThreads=2 -dBATCH -dUseCropBox -dNOPAUSE -sPDFPassword=\"\" -sDEVICE=png16m -r200 -sOutputFile=\"output\" 

是否有任何可用的包装或其他任何方式,我可以在命令行工作使用,因为当我只是尝试在C#项目添加gsdll32.dll的参考,我得到以下错误:

The reference could not be added. Please make sure that the file is accesible, and that it is a valid assembly or COM component. 

回答

2

你签字IRC之前我能建议你看看Ghostscript.NET由约瑟普Habjan 。

+0

我已经看过它,但我找不到选项来使用CCITG4压缩将加载的PDF保存为tiff图像。任何想法的人? – amyn 2014-09-25 12:45:10

+0

找到了我的答案。给出的基本示例[这里](https://github.com/jhabjan/Ghostscript.NET/blob/master/Ghostscript.NET.Samples/Samples/ProcessorSample.cs) – amyn 2014-09-25 13:04:37