summaryrefslogtreecommitdiff
path: root/regtest
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2015-12-04 11:08:45 +0100
committerCarlos Garcia Campos <carlosgc@gnome.org>2015-12-04 11:08:45 +0100
commit9ef565d0302ad4a36c53d7cd3251bff6a53070ea (patch)
treec31463ab2540d0bc21ba135a0a53bf638b49ae3e /regtest
parent3686005cde6f0c0992498a1773b02331fce79b1c (diff)
regtest: Pass always both the owner and user passwords to the tools
Diffstat (limited to 'regtest')
-rw-r--r--regtest/backends/cairo.py2
-rw-r--r--regtest/backends/postscript.py2
-rw-r--r--regtest/backends/splash.py2
-rw-r--r--regtest/backends/text.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/regtest/backends/cairo.py b/regtest/backends/cairo.py
index 818ac3bc..3dd9c799 100644
--- a/regtest/backends/cairo.py
+++ b/regtest/backends/cairo.py
@@ -30,7 +30,7 @@ class Cairo(Backend):
out_path = os.path.join(refs_path, 'cairo')
cmd = [self._pdftocairo, '-cropbox', '-r', '72', '-png', doc_path, out_path]
if password is not None:
- cmd.extend(['-opw', password])
+ cmd.extend(['-opw', password, '-upw', password])
p = subprocess.Popen(cmd, stderr = subprocess.PIPE)
return self._check_exit_status(p, out_path)
diff --git a/regtest/backends/postscript.py b/regtest/backends/postscript.py
index f9547cdf..c7e8b612 100644
--- a/regtest/backends/postscript.py
+++ b/regtest/backends/postscript.py
@@ -30,7 +30,7 @@ class PostScript(Backend):
out_path = os.path.join(refs_path, 'postscript')
cmd = [self._pdftops, doc_path, out_path + '.ps']
if password is not None:
- cmd.extend(['-opw', password])
+ cmd.extend(['-opw', password, '-upw', password])
p = subprocess.Popen(cmd, stderr = subprocess.PIPE)
return self._check_exit_status(p, out_path)
diff --git a/regtest/backends/splash.py b/regtest/backends/splash.py
index f107198a..54f88f9a 100644
--- a/regtest/backends/splash.py
+++ b/regtest/backends/splash.py
@@ -30,7 +30,7 @@ class Splash(Backend):
out_path = os.path.join(refs_path, 'splash')
cmd = [self._pdftoppm, '-cropbox', '-r', '72', '-png', doc_path, out_path]
if password is not None:
- cmd.extend(['-opw', password])
+ cmd.extend(['-opw', password, '-upw', password])
p = subprocess.Popen(cmd, stderr = subprocess.PIPE)
return self._check_exit_status(p, out_path)
diff --git a/regtest/backends/text.py b/regtest/backends/text.py
index 8aa59fac..e36f4863 100644
--- a/regtest/backends/text.py
+++ b/regtest/backends/text.py
@@ -30,7 +30,7 @@ class Text(Backend):
out_path = os.path.join(refs_path, 'text')
cmd = [self._pdftotext, doc_path, out_path + '.txt']
if password is not None:
- cmd.extend(['-opw', password])
+ cmd.extend(['-opw', password, '-upw', password])
p = subprocess.Popen(cmd, stderr = subprocess.PIPE)
return self._check_exit_status(p, out_path)