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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Srinivasan RamamoorthiRank #877 · 2.5K reputationPosted Oct 11, 2021, 6:59 AM EDT
Rijwan AnsariRank #82 · 24.2K reputationPosted Oct 12, 2021, 12:27 AM EDT
Satya KarkiRank #78 · 24.6K reputationPosted Oct 12, 2021, 12:31 AM EDT
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);
}
Leon DRank #851 · 2.6K reputationPosted Oct 12, 2021, 4:22 AM EDT
Marvin ReidRank #1,963 · 746 reputationPosted Oct 13, 2021, 2:33 PM EDT