euske/pdfminer — pull request #55 by deanmalmgren (2014-06-27 19:06:17+00:00)
Title: handle encrypted (but not password protected) PDFs

For example, [this document](http://www.chcf.org/~/media/MEDIA%20LIBRARY%20Files/PDF/P/PDF%20PatientSelfMgt.pdf) is encrypted but not password protected. This is the output I get when trying to convert to html:

```bash
[unix]$ pdf2txt.py -t html -o kk.html encrypted.pdf
Traceback (most recent call last):
File "/usr/local/bin/pdf2txt.py", line 115, in
if __name__ == '__main__': sys.exit(main(sys.argv))
File "/usr/local/bin/pdf2txt.py", line 107, in main
caching=caching, check_extractable=True):
File "/usr/local/lib/python2.7/dist-packages/pdfminer/pdfpage.py", line 124, in get_pages
raise PDFTextExtractionNotAllowed('Text extraction is not allowed: %r' % fp)
pdfminer.pdfdocument.PDFTextExtractionNotAllowed: Text extraction is not allowed:
```

Could probably [use qpdf to decrypt](http://sergey.marechek.com/blog/2012/04/29/184/) the output as necessary.