Extract image from PDF using .Net c# [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
开发者_如何学编程Closed 6 years ago.
Improve this questionI want to extract images from PDF. Tried many solutions but still not getting solution. Help me out....Thanks in advance
Docotic.Pdf library can be used to extract images from PDFs.
Here is a sample that shows how to extract all images from a PDF:
static void ExtractAllImages()
{
string path = "";
using (PdfDocument pdf = new PdfDocument(path))
{
for (int i = 0; i < pdf.Images.Count; i++)
{
string imageName = string.Format("image{0}", i);
string imagePath = pdf.Images[i].Save(imageName);
}
}
}
The library won't resample images. It will save them exactly the same as in PDF.
Disclaimer: I work for Bit Miracle, vendor of the library.
精彩评论