Hello
I have a requirement to read text from PDF so we have used getpdftext but if the user uploads password protected PDF file , the function getpdftext is throwing the below error-
Expression evaluation error at function 'getpdftext': Cannot decrypt PDF, the password is incorrect
If the file is password protected, I need to by pass the flow which is going to getpdftext, So Before only I need to check if the file is password protected or NOT. Can any one please suggest how to achieve this.
Discussion posts and replies are publicly visible
There is another plugin you could use - Document Page Counter and its "getnumberofpages" function.While it doesn't actually tell you a pdf is password-protected, it will return a value of 0 for the page count, and, more importantly, won't throw an error.
Mike's very subtle suggestion would give a more positive answer, but this plugin would at least avoid any unsupported concerns...