Merge branch 'master' of github.com:euske/pdfminer
commit
149652c072
|
@ -34,7 +34,7 @@ Features
|
||||||
How to Install
|
How to Install
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
* Install Python 2.6 or newer. (**Python 3 is not supported.**)
|
* Install Python 2.6 or newer. (**For Python 3 support have a look at [pdfminer.six](https://github.com/goulu/pdfminer)**).
|
||||||
* Download the source code.
|
* Download the source code.
|
||||||
* Unpack it.
|
* Unpack it.
|
||||||
* Run `setup.py`:
|
* Run `setup.py`:
|
||||||
|
|
|
@ -162,6 +162,7 @@ ENCODING = [
|
||||||
('mu', None, 181, 181, 181),
|
('mu', None, 181, 181, 181),
|
||||||
('multiply', None, None, 215, 215),
|
('multiply', None, None, 215, 215),
|
||||||
('n', 110, 110, 110, 110),
|
('n', 110, 110, 110, 110),
|
||||||
|
('nbspace', None, 202, 160, None),
|
||||||
('nine', 57, 57, 57, 57),
|
('nine', 57, 57, 57, 57),
|
||||||
('ntilde', None, 150, 241, 241),
|
('ntilde', None, 150, 241, 241),
|
||||||
('numbersign', 35, 35, 35, 35),
|
('numbersign', 35, 35, 35, 35),
|
||||||
|
|
|
@ -11,7 +11,7 @@ from sys import maxint as INF
|
||||||
def apply_png_predictor(pred, colors, columns, bitspercomponent, data):
|
def apply_png_predictor(pred, colors, columns, bitspercomponent, data):
|
||||||
if bitspercomponent != 8:
|
if bitspercomponent != 8:
|
||||||
# unsupported
|
# unsupported
|
||||||
raise ValueError(bitspercomponent)
|
raise ValueError("Unsupported `bitspercomponent': %d"%bitspercomponent)
|
||||||
nbytes = colors*columns*bitspercomponent//8
|
nbytes = colors*columns*bitspercomponent//8
|
||||||
i = 0
|
i = 0
|
||||||
buf = b''
|
buf = b''
|
||||||
|
@ -43,7 +43,7 @@ def apply_png_predictor(pred, colors, columns, bitspercomponent, data):
|
||||||
line2 += chr(c)
|
line2 += chr(c)
|
||||||
else:
|
else:
|
||||||
# unsupported
|
# unsupported
|
||||||
raise ValueError(ft)
|
raise ValueError("Unsupported predictor value: %d"%ft)
|
||||||
buf += line2
|
buf += line2
|
||||||
line0 = line2
|
line0 = line2
|
||||||
return buf
|
return buf
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -18,6 +18,9 @@ PDF parser that can be used for other purposes instead of text analysis.''',
|
||||||
author='Yusuke Shinyama',
|
author='Yusuke Shinyama',
|
||||||
author_email='yusuke at cs dot nyu dot edu',
|
author_email='yusuke at cs dot nyu dot edu',
|
||||||
url='http://euske.github.io/pdfminer/index.html',
|
url='http://euske.github.io/pdfminer/index.html',
|
||||||
|
install_requires=[
|
||||||
|
'pycrypto',
|
||||||
|
],
|
||||||
packages=[
|
packages=[
|
||||||
'pdfminer',
|
'pdfminer',
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue