To convert PDF file to image in PNG format, Please use lib-pdf
You can download the library here
lib-pdf
The code to convert pdf to image is simple,
Please find copied the code :
using (FileStream file = File.OpenRead(@"..\path\to\pdf\file.pdf"))
{
var bytes = new byte[file.Length];
file.Read(bytes, 0, bytes.Length);
using (var pdf = new LibPdf(bytes))
{
byte[] pngBytes = pdf.GetImage(0,ImageType.PNG);
using (var outFile = File.Create(@"..\path\to\pdf\file.png"))
{
outFile.Write(pngBytes, 0, pngBytes.Length);
}
}
}
In the link i provided, you will reach lib-pdf site home page.
1. Goto downloads tab at the top
2. Download the x86 release binaries (your project must be x86 too)
You will find the dll files there.
Or use this direct link.
https://code.google.com/p/lib-pdf/downloads/detail?name=binaries.zip&can=2&q=[^][
^]