无法处理GhostScript命令

时间:2013-10-18 05:25:00

标签: c# asp.net image pdf ghostscript

public void ConvertPdfPageToImage(string outputFileName, int pageNumber)
    {
      if (pageNumber < 1 || pageNumber > this.PageCount)
        throw new ArgumentException("Page number is out of bounds", "pageNumber");

      using (GhostScriptAPI api = new GhostScriptAPI())
        api.Execute(this.GetConversionArguments(this._pdfFileName, outputFileName, pageNumber, this.PdfPassword, this.Settings));
    }

我正在使用上面的方法将pdf的每个页面转换为asp.net中的图像。它与一些pdf工作正常。但是在使用其他一些pdf时,它只转换一些页面并显示“无法处理GhostScript命令。错误代码:-100”错误消息。 * 注意: * pdf的内存大小不是问题。

0 个答案:

没有答案