In my pdf, it has many images and after every image there is a name of the image.
I want to extract the image and i want to put image name as name of the image.
Anyone have idea how to do?
I tried in google, I did nt fine good ones.
Thanks
Drama
Extract particular text below an image from PDF
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Lacy Michelle148 reputationPosted Aug 2, 2012, 7:17 PM EDT
StringBuilder buffer = new StringBuilder();
IList images = new List();
foreach (PdfPageBase page in doc.Pages)
{
buffer.Append(page.ExtractText());
foreach (System.Drawing.Image image in page.ExtractImages())
{
images.Add(image);
}
}
doc.Close();
//save text
String fileName = "TextInPdf.txt";
File.WriteAllText(fileName, buffer.ToString());
//save image
int index = 0;
foreach (System.Drawing.Image image in images)
{
String imageFileName
= String.Format("Image-{0}.png", index++);
image.Save(imageFileName, ImageFormat.Png);
}
Jony Green103 reputationPosted Oct 18, 2015, 11:37 PM EDT