tylabs/quicksand

DCT Decoding Error

admercs opened this issue · 1 comments

I'm getting an error from the pdfreader depdendency:

$ document.pdf
ERROR:root:Partially decoded. Filters applied: []
Traceback (most recent call last):
  File "/HOME/quicksand/lib/python3.6/site-packages/pdfreader/types/native.py", line 55, in apply_filter_multi
    binary = apply_filter(fname, binary, params)
  File "/HOME/quicksand/lib/python3.6/site-packages/pdfreader/filters/__init__.py", line 14, in apply_filter
    return decoder.decode(binary, params or {})
  File "/HOME/quicksand/lib/python3.6/site-packages/pdfreader/filters/dct.py", line 5, in decode
    raise NotImplementedError('DCTDecode')
NotImplementedError: DCTDecode

Any idea how to resolve it?

3d party library pdfreader uses the PIL library to process DCT encoding, you may need to install that and reinstall the latest pdfreader. See source here https://github.com/maxpmaxp/pdfreader/blob/5757c830757236f7f1fc17a9275c6993967ecf78/pdfreader/filters/dct.py#L4