 sometimes pdf file contains some attachments to it and in this program we are going to see how we can accept the attachments and save it. So let's get started here we are having one pdf file which is containing some attachments hidden to it. So if you see like it's a tip file it's png file it's emf file. So we are going to see how we can extract these attachments and save it over localize. So I am already having this pdf file here and make sure it is copy always and this is our game plan like we are for this we are using the attachment extractor class we are going to load document to it we are iterating through all the attachments and we are going to save it and if you want to have some extra information about the attachments we can use some methods like for example we are having the method to get file size to get the size of the file we have the method get file name to get the name of the file. So here I am creating the instance of attachment extractor, registration name, registration key here oops let me load the document extractor.load document from file we are going to pass the name of the attachment. Let us iterate through it so I am having the for loop extractor.count and let us save it somewhere extractor.save to pass the index and file name. So let us use the original file name here so I am getting that extractor.get file name and let us also display in the console console.writeLine file name at size so we have to pass the index and let us see ok it is able to get the 3 attachments to it and let us see whether it is stored in the bin folder or not here it is. So one is the sample.png here it is second one sample metafile.amf here it is and another is ab.tmf here it is.