|
|
|
@ -56,7 +56,8 @@ def pdfinfo(pdf_name, *args):
|
|
|
|
|
A dictionary containing the lines of stdout from calling 'pdfinfo'
|
|
|
|
|
"""
|
|
|
|
|
command_str = ['pdfinfo', *args, pdf_name]
|
|
|
|
|
result = subprocess.run(command_str, stdout=subprocess.PIPE)
|
|
|
|
|
result = subprocess.run(
|
|
|
|
|
command_str, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
|
|
|
|
|
stdout = result.stdout.decode('utf-8').split('\n')
|
|
|
|
|
|
|
|
|
|
pdf_info = {}
|
|
|
|
@ -76,7 +77,7 @@ def isencrypted(pdf_name):
|
|
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
True if encrypted, otherwise False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Raises:
|
|
|
|
|
AttributeError if pdf info cannot be obtained
|
|
|
|
|
"""
|
|
|
|
|