使用GhostScriptSharp将多页PDF转换为一个图像

时间:2017-01-09 17:17:55

标签: c# pdf ghostscript ghostscriptsharp

我使用GhostScriptSharp从PDF文档生成图像。它适用于单个页面,但我之后的目的是让它从整个文档中生成一个图像。

这是我的代码:

GhostscriptWrapper.GenerateOutput(sourcePdfFilePath, destinationPngFilePath,
    new GhostscriptSettings
    {
        Device = GhostscriptDevices.pngalpha,
        Page = new GhostscriptPages
        {
            AllPages = true
        },
        Resolution = new Size
        {
            Height = 72,
            Width = 72
        },
        Size = new GhostscriptPageSize
        {
            Native = GhostscriptPageSizes.a4
        }
    }
);

0 个答案:

没有答案
相关问题