Extraction of Images From PDF

Hi All, I have a pdf files that contains indvidual photographs inside it on
every page.Every Indvidual has a Unique Serial No againt it. But there are
cases when the indvidual photographs is not available against Unique Serial
No. and hence there is a vaccant space. Iam able to extract all the images
from PDF file using Itextsharp. But it is not able to check for which Serial
No. the Photograph is not there.
Please help me out in case you have some solution for it.
Thanks a Lot

Hi Rajeev,

Thank you very much for considering Aspose.

I’m afraid, I couldn’t understand your requirement completely. Could you please elaborate your requirement with the help of some sample PDF? So, we could look into it in detail and guide you accordingly.

Regards,


Hi,


Iam sending you a sample pdf file. In this .pdf file, please see the Page No. 2. It has some images with Unique serial no. and somewhere you will find Serial No. without Images. Iam looking for a solution where there is no image, the extraction should skip that serial no when saving the Image file Naming Convention. e.g. 1.jpg, 2,jpg, 3.jpg, 5.jpg

Now as you can see, since there is no image for Serial No. 4, the Image extraction skipped it as well. That is wat iam looking for, so that i can easily identify for which serial no. there is no image in the .pdf file.

let me know if iam able to convey my issue exactly.

Thanks

Rajeev

Hi Rajeev,

I have looked into your requirement and I’m sorry to share with you that it is not feasible to relate the serial no. (which is just some text in the PDF file) to an image; although, the serial nos. and images are formatted visually, they don’t relate to each other in the internal structure of the PDF file.

The only feasibility could be if you add the images with a particular serial no. as its name. Then you may try using GetImageDescriptions method to get all the information of the images including its name. After that, you can save those images with their particular names, which would be the serial nos. in your case.
Please have a look into this sample for more details.

We’re sorry for the inconvenience. If you have any further questions, please do let us know.
Regards,

Hi,

I don’t want to relate text with image here. I just need that while saving images with file naming conventions if there is no image even though it should save the blank image or some other sort of arrangements so that we can identify that this file has a blank image.

let me know.

Thanks
Rajeev

Hi Rajeev,

As I shared earlier, there is no way for the Aspose.Pdf.Kit to identify the places where there is no image along with the serial no. The problem is that these objects (image and serial no.) are not related internally in any way. That’s why it is not feasible for the component to make sure that some blank image or no image is saved for the particular serial no.

There is only one feasibility and that again only if you have control over the source PDF file; if you could add the images using their serial number or add some empty image where there is no actual image added.

We’re sorry for the inconvenience.
Regards,