Pdf parser Image extraction from pdf
I am using iTextsharp to extract images from the PDF file, i am able to extract images but the extracted images are not in correct format (i.e. it looks like negative proof).
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.
Hugo IvanPosted Jun 18, 2015, 5:33 AM
http://stackoverflow.com/questions/5945244/extract-image-from-pdf-using-itextsharp
I am currently using leadtools to load PDF files as images, and save them to TIFF format.
Mote details can be found here:
http://support.leadtools.com/SupportPortal/CS/forums/22379/showpost.aspx
Saroj Kumar SahuPosted Jun 11, 2015, 5:57 AM
Upendra Pratap ShahiPosted Jun 11, 2015, 5:28 AM
yehudi liPosted Jun 11, 2015, 4:41 AM
arron leePosted Oct 24, 2013, 11:03 PM
Best regards,
Arron
chandra shankerPosted Oct 14, 2013, 11:53 PM
Ring ZhongPosted Oct 14, 2013, 11:28 PM
any code you use? so that we could find the problem, thank you.
maybe you could evaluate another component, here is code for you to have a try,
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using Spire.Pdf;
namespace ExtractImagesFromPDF
{
class Program
{
static void Main(string[] args)
{
//Instantiate an object of Spire.Pdf.PdfDocument
PdfDocument doc = new PdfDocument();
//Load a PDF file
doc.LoadFromFile("sample.pdf");
List ListImage = new List();
for (int i = 0; i < doc.Pages.Count; i++)
{
// Get an object of Spire.Pdf.PdfPageBase
PdfPageBase page = doc.Pages[i];
// Extract images from Spire.Pdf.PdfPageBase
Image[] images = page.ExtractImages();
if (images != null && images.Length > 0)
{
ListImage.AddRange(images);
}
}
if (ListImage.Count > 0)
{
for (int i = 0; i < ListImage.Count; i++)
{
Image image = ListImage[i];
image.Save("image" + (i + 1).ToString() + ".png", System.Drawing.Imaging.ImageFormat.Png);
}
System.Diagnostics.Process.Start("image1.png");
}
}
}
}
Source: How to Extract Image From PDF in C#?