try to decrypt pdf with empty password if its encrypted
This commit is contained in:
parent
9304d14c5f
commit
c6c8e0dc8a
1 changed files with 3 additions and 1 deletions
|
@ -101,6 +101,8 @@ def info(pdf):
|
||||||
try:
|
try:
|
||||||
pdfreader = PdfFileReader(fd)
|
pdfreader = PdfFileReader(fd)
|
||||||
data['pages'] = pdfreader.numPages
|
data['pages'] = pdfreader.numPages
|
||||||
|
if pdfreader.getIsEncrypted():
|
||||||
|
pdfreader.decrypt('')
|
||||||
info = pdfreader.getDocumentInfo()
|
info = pdfreader.getDocumentInfo()
|
||||||
if info:
|
if info:
|
||||||
for key in info:
|
for key in info:
|
||||||
|
|
Loading…
Reference in a new issue