We were checking if Pdf file is encrypted using PdfFileInfo.isEncrypted() method.
During the process, we encountered the below issue:
For Password protected pdf documents, if we use PdfFileInfo or Document and initialize it without providing password, it leads to locked files by Java Application.
Aspose doesn’t release Pdf file from Java memory even after calling cleanup methods like:
PdfFileInfo.dispose, PdfFileInfo.close, Document.dispose, Document.close
This issue is only for Password Protected PDF files.
Please find the attached code snippet and protected Pdf used.
Similar issue was raised earlier for invalid Pdf file. Below is link for the same: