Hi nishud3040,
Use the Pdf2Png library.
Install the package using the following command.
Install-Package Pdf2Png -Version 1.0.2
The refer the code for converting PDF to Image.
C#
string pdfFile = Server.MapPath("~/Files/Sample.pdf");
string imageFile = Server.MapPath("~/Files/Sample.jpg");
cs_pdf_to_image.Pdf2Image.Convert(pdfFile, imageFile);
VB.Net
Dim pdfFile As String = Server.MapPath("~/Files/Sample.pdf")
Dim imageFile As String = Server.MapPath("~/Files/Sample1.jpg")
cs_pdf_to_image.Pdf2Image.Convert(pdfFile, imageFile)
For more details refer below link.
https://github.com/chen0040/cs-pdf-to-image