How to convert .pdf file to image file for free using C#.net. I don't want to use any 3rd party software. please guide me.
Loading
How to convert .pdf file to image file for free using C#.net. I don't want to use any 3rd party software. please guide me.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Marvin ReidPosted Oct 13, 2021, 6:33 PM
Leon DPosted Oct 12, 2021, 8:22 AM
Satya KarkiPosted Oct 12, 2021, 4:31 AM
You can use Spire.Pdf
Sample
PdfDocument pdfdocument = new PdfDocument("Sample.pdf");
for(int i=0;i< pdfdocument.Pages.Count;i++)
{
System.Drawing.Image image= pdfdocument.SaveAsImage(i, 96, 96);
image.Save(string.Format("ImagePage{0}.png", i), System.Drawing.Imaging.ImageFormat.Png);
}
Rijwan AnsariPosted Oct 12, 2021, 4:27 AM
Srinivasan RamamoorthiPosted Oct 11, 2021, 10:59 AM