How do I export PDF document to image file

To export PDF document's pages to an image file, UniPDF has provided functions to help writing PDF page to an image file. That functions are described below

import ""

// Get an image device where we can render PDF document to image
device := render.NewImageDevice()

// Converts the specified PDF page into an image and saves the
// result at the specified location
device.RenderToPath(page, outputFilename)

For a complete example visit