export pdf: NotImplementedError
Brought to you by:
logari81
when exporting a pdf file, I get the following error:
Traceback (most recent call last):
File "/usr/bin/pdfshuffler", line 411, in choose_export_pdf_name
self.export_to_file(file_out)
File "/usr/bin/pdfshuffler", line 434, in export_to_file
if (pdfdoc_inp.decrypt('')!=1): # Workaround for lp:#355479
File "/usr/lib/pymodules/python2.6/pyPdf/pdf.py", line 794, in decrypt
return self._decrypt(password)
File "/usr/lib/pymodules/python2.6/pyPdf/pdf.py", line 803, in _decrypt
raise NotImplementedError, "only algorithm code 1 and 2 are supported"
NotImplementedError: only algorithm code 1 and 2 are supported
If you need more info please ask
This bug is related to the library python-pypdf, if you run Ubuntu try the following package
https://launchpad.net/~logari81/+archive/ppa/+build/2066591
otherwise download the latest git revision of pypdf here:
https://github.com/mfenniak/pyPdf
I updated to pyPdf version 1.13, but I still get the same error when I try to export a pdf. Console output below:
Traceback (most recent call last):
File "/usr/bin/pdfshuffler", line 411, in choose_export_pdf_name
self.export_to_file(file_out)
File "/usr/bin/pdfshuffler", line 434, in export_to_file
if (pdfdoc_inp.decrypt('')!=1): # Workaround for lp:#355479
File "/usr/local/lib/python2.6/dist-packages/pyPdf/pdf.py", line 894, in decrypt
return self._decrypt(password)
File "/usr/local/lib/python2.6/dist-packages/pyPdf/pdf.py", line 903, in _decrypt
raise NotImplementedError, "only algorithm code 1 and 2 are supported"
NotImplementedError: only algorithm code 1 and 2 are supported
I tried to merge the same pdfs in Acrobat later, and found that one of them was secured with a password. If possible, it would be nice to have notification of the error, maybe even a prompt for the password. Right now, pdfshuffler simply doesn't respond (even the 'cancel' button stops working once export fails), with no indication of what went wrong. Running from console at least gives error messages, but those weren't very helpful to me as an end-user.