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