I have a code which extracts text from PDF documents, As such some PDFs are password protected, I need a way to Identify if a PDF is password protected
I am using.BitMiracle.Docotic.Pdf
library.
Purpose:- If I find the PDF as password protected then I will show a dialog prompt to user to enter password and then open PDF using that password.
Edit 1: Solution posted as answer