2014-09-25 102 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