I'm using GhostScriptSharp to generate images from PDF documents. It works for single pages, but what I'm after is getting it to generate one image from the whole document.
Here's my code:
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
}
}
);
You need to do 'imposition' or 'n-up'. There's no provision for this as standard, you can do it, but you need to do some PostScript programming, and since the input is PDF that's going to make it trickier. You might be better advised to use a tool intended to do PDF imposition.
BTW how do you plan to get one image from a (for example) 1000 page document ? If that seems extreme, I've seen PDF files with more than 64k pages in them....