Suppress poppler warnings in console

master
Dan Howe 7 years ago
parent a003581825
commit 661a6663c8

@ -4,7 +4,7 @@ __pdf_unlock.py__ removes security features from pdfs, to allow unrestricted pri
## Installation ## ## 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: Windows users will have to add the binary directories to the `PATH` environment variable manually, eg:

@ -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 = {}

Loading…
Cancel
Save