- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Drawing;
- using Spire.Pdf;
- namespace ConvertPdfToImage
- {
- class Program
- {
- static void Main(string[] args)
- {
- PdfDocument doc = new PdfDocument();
- doc.LoadFromFile(@"..\..\E-gowtham.pdf");
- Image img = doc.SaveAsImage(0);
- img.Save(@"..\..\gowtham.jpg");
- doc.Close();
- System.Diagnostics.Process.Start(@"..\..\gowtham.jpg");
- }
- }
- }
This is a code snippet in C # which example to manage PDF file via a Free C# PDF library. And the code gives you clear information of how to convert PDF file to image in C#.