diff --git a/README.md b/README.md index 15dac09..2ada548 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ __pdf_unlock.py__ removes security features from pdfs, to allow unrestricted pri ## Installation ## -[Ghostscript](https://ghostscript.com) and [Poppler](https://poppler.freedesktop.org) are required. +[Ghostscript](https://ghostscript.com) and [Poppler](http://blog.alivate.com.au/poppler-windows) are required. Windows users will have to add the binary directories to the `PATH` environment variable manually, eg: diff --git a/scripts/pdf_unlock.py b/scripts/pdf_unlock.py index ba7e29f..472a51c 100644 --- a/scripts/pdf_unlock.py +++ b/scripts/pdf_unlock.py @@ -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 """