We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Extracting images from PDF

Hi,
I'm trying to extract images from the attached PDF with the following code:

Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument(name)

' Loading Page collections
Dim loadedPages As PdfLoadedPageCollection = ldoc.Pages

' Extract Image from PDF document pages
For Each lpage As PdfLoadedPage In loadedPages

n += 1

Dim img As Image() = lpage.ExtractImages()
If img Is Nothing Then Continue For

For Each img1 As Image In img
img1.Save("Image.png", ImageFormat.Png)
Next img1

Next lpage

ldoc.Dispose()

but i get no images. The ExtractImages function return an empty Image array.

Can You give any hints?

Regards.




12_1004_AAPPL_0035_e887a43d.zip

7 Replies

GM Geetha M Syncfusion Team November 1, 2010 11:20 AM UTC

Hi FeliceR,

Thank you for your continued interest in Syncfusion products.

I was able to see the problem. But the images in the file use "CCITTFaxDecode" filter which Essential PDF currently does not support.

Please let me know if you have any questions.

Regards,
Geetha



FE FeliceR November 1, 2010 05:07 PM UTC

Hi Geetha,

Is there a way for extracting the data stream from PDF so I can treat it with a custom tiff library such the following:

http://stackoverflow.com/questions/2641770/extracting-image-from-pdf-with-ccittfaxdecode-filter

Regards,
Geetha




GM Geetha M Syncfusion Team November 2, 2010 08:08 AM UTC

Hi FeliceR,

Currently it is not possible to read data stream from PDF.

Please let me know if you have any questions.

Regards,
Geetha



FE FeliceR November 20, 2010 04:41 PM UTC

Hi,

I'm currently using Your library for handling PDF files.
So, Do I need to evaluate another PDF library such iTextSharp for handling these files? Replacing Your library.

Do You have a time line for embedding CCITT images?

Regards.



PJ Priyadharshini J Syncfusion Team November 23, 2010 10:08 AM UTC

Hi FeliceR,

Thank you for your interest in syncfusion products.

We are able to see that the images in the PDF document are encoded using CCITTFaxDecode filter. Currently, Essential Pdf supports only extraction of images that are DCTDecoded. We have already added a feature request to extract CCITTFaxDecoded images. We will let you know once this feature is added to the library.

Please let us know if you have any queries.

Regards,
Priyadharshini




FE FeliceR November 23, 2010 12:42 PM UTC

Hy,

I have tryed to extract images with the attached PDF files and Your library seems do not return images.
...or better, it has found images, but the handle of the image isn't available.

Have You any hint?

Regards,
Felice



CODBARRE_2d544ab4.zip


PJ Priyadharshini J Syncfusion Team November 24, 2010 11:33 AM UTC

Hi FeliceR,

Thanks for the details.

We are able to see that the barcode in the pdf is not an image and they are made up of graphical elements(series of lines). Since there is no image in the Pdf document, it was not extracted while using our API.

Please let us know if you have any queries.

Regards,
Priyadharshini



Loader.
Live Chat Icon For mobile
Up arrow icon