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

Loop in PDF ExtractImages

Hi,

I'm trying extract images from the attached PDF, using the following sample code:

Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument(name)

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

Dim img2 As Image() = loadedPages(98).ExtractImages

' Extract Image from PDF document pages
For Each lpage As PdfLoadedPage In loadedPages
Dim img As Image() = lpage.ExtractImages()
If img Is Nothing Then Continue For

For Each img1 As Image In img
img1.Save("Image" & Guid.NewGuid().ToString() & ".png", ImageFormat.Png)

Next img1

Next lpage

ldoc.Dispose()
ldoc.Close(True)

When extracting images from page 98 it's seems to looping in ExtracImages(I added a code line directly on page 98, as You can see).

Could You please give me any hints?

Regards.





Guide_4ba7730a.zip

3 Replies

GM Geetha M Syncfusion Team October 20, 2010 06:49 AM UTC

Hi FeliceR,

Thank you for your interest in Syncfusion products.

I was able to reproduce the problem. But it has been fixed internally. The fix will be available in Essential Studio 2010 Volume 4 release which is due this month. You can check the website periodically for release information.

Please let me know if you have any questions.

Regards,
Geetha



FE FeliceR October 23, 2010 02:30 PM UTC

Ok.
Regards.



GM Geetha M Syncfusion Team October 25, 2010 08:06 AM UTC

Hi FeliceR,

Thank you for the update.

Regards,
Geetha


Loader.
Live Chat Icon For mobile
Up arrow icon