Commit 9ef565d0 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

regtest: Pass always both the owner and user passwords to the tools

parent 3686005c
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment