Merge pull request #52 from hinesmr/master

Stop throwing exception on LITERALS_DCT_DECODE
pull/1/head
Yusuke Shinyama 2014-05-15 21:52:23 +09:00
commit 29ebc2d618
1 changed files with 4 additions and 0 deletions

View File

@ -250,6 +250,10 @@ class PDFStream(PDFObject):
data = rldecode(data) data = rldecode(data)
elif f in LITERALS_CCITTFAX_DECODE: elif f in LITERALS_CCITTFAX_DECODE:
data = ccittfaxdecode(data, params) data = ccittfaxdecode(data, params)
elif f in LITERALS_DCT_DECODE:
# This is probably a JPG stream - it does not need to be decoded twice.
# Just return the stream to the user.
pass
elif f == LITERAL_CRYPT: elif f == LITERAL_CRYPT:
# not yet.. # not yet..
raise PDFNotImplementedError('/Crypt filter is unsupported') raise PDFNotImplementedError('/Crypt filter is unsupported')