How to handle corrupted pdf file indirectory

hi,
i have many pdf files in directory.
in for each loop - i am reading all pdf files
if it is readable will extracted records into excel, then it move to success folder files. if it is not not Readable then i move to Unsuccess folder.
but the problem here is >
1.some pdf files may be corrupted even Readable files and not moving to success folder.
2.it is reading pdf file and extracting records into excel but it not moving success folder because it is corrupted .

how to handle this type of files. ??
can any one help this …

Hi @Anand_Designer ,

What do you mean by corrupted file?

If you are expecting 10 columns of data from that PDF, if you are not getting all then do not move the file to the successful folder.

If you are getting all the expected parameters, then if the file has all data then move it to success folder.

corrupted file mean… it is not delete manually and copy paste into another folder i tried many times but i could not do.
.so i consider it is may be error file and corrupted file.

Check this below workflow I have used VB.net code to check the pdf corruption, @Anand_Designer Uipath_PdfCorruptCheck.xaml (5.3 KB) and Download the package - Syncfusion.Pdf.Net.Core from manage packages.
Hope this may help you :slight_smile: