 In this program, we are going to see how we can extract images from the PDF We are having some images in this PDF So let us use this as our sample document I'm going to include here Right-click copy and paste copy always So our game plan is like we're going to create instance of the image extractor class We're going to load the document We are getting the images and we are keep on iterating to reach all the images and We are just saving the current image to the file Okay, so Here Image extractor new image extractor, I'm going to give the Station keys and name Let us load document load document from file sample program 2.vdf if Let us say extractor.get first image So basically it will confirm like it is having images or not then we are Keep on going until we fetch with each end of the images and At this moment, we are just saving image extractor.save current image to file Let us name it like Let me have one variable for this also one counter result plus plus png resultfine file and image format. Let us take like image format dot png and Let us run it done. Let us see What we have in the bin folder? Here it is. So if we open the pdf we are having the three images one two and three And it generated three results one two and three