Extract image from PDF using .Net c#
.net, c#, extract, image, pdf
Solution
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.
Problem
I want to extract images from PDF. Tried many solutions but still not getting solution. Help me out....Thanks in advance