Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ea4ec3de8 | |||
| 6c4b468800 | |||
| 5330620ea2 | |||
| 45ae980988 | |||
| 215e5ea2a5 |
+15
@@ -4,6 +4,21 @@ Release History
|
|||||||
master
|
master
|
||||||
------
|
------
|
||||||
|
|
||||||
|
0.7.2 (2019-01-10)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
**Bugfixes**
|
||||||
|
|
||||||
|
* [#245](https://github.com/socialcopsdev/camelot/issues/245) Fix AttributeError for encrypted files. [#251](https://github.com/socialcopsdev/camelot/pull/251) by Yatin Taluja.
|
||||||
|
|
||||||
|
|
||||||
|
0.7.1 (2019-01-06)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
**Bugfixes**
|
||||||
|
|
||||||
|
* Move ghostscript import to inside the function so Anaconda builds don't fail.
|
||||||
|
|
||||||
0.7.0 (2019-01-05)
|
0.7.0 (2019-01-05)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
VERSION = (0, 7, 0)
|
VERSION = (0, 7, 2)
|
||||||
PRERELEASE = None # alpha, beta or rc
|
PRERELEASE = None # alpha, beta or rc
|
||||||
REVISION = None
|
REVISION = None
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -33,13 +33,14 @@ class PDFHandler(object):
|
|||||||
self.filepath = filepath
|
self.filepath = filepath
|
||||||
if not filepath.lower().endswith('.pdf'):
|
if not filepath.lower().endswith('.pdf'):
|
||||||
raise NotImplementedError("File format not supported")
|
raise NotImplementedError("File format not supported")
|
||||||
self.pages = self._get_pages(self.filepath, pages)
|
|
||||||
if password is None:
|
if password is None:
|
||||||
self.password = ''
|
self.password = ''
|
||||||
else:
|
else:
|
||||||
self.password = password
|
self.password = password
|
||||||
if sys.version_info[0] < 3:
|
if sys.version_info[0] < 3:
|
||||||
self.password = self.password.encode('ascii')
|
self.password = self.password.encode('ascii')
|
||||||
|
self.pages = self._get_pages(self.filepath, pages)
|
||||||
|
|
||||||
def _get_pages(self, filepath, pages):
|
def _get_pages(self, filepath, pages):
|
||||||
"""Converts pages string to list of ints.
|
"""Converts pages string to list of ints.
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import pandas as pd
|
|||||||
|
|
||||||
from .base import BaseParser
|
from .base import BaseParser
|
||||||
from ..core import Table
|
from ..core import Table
|
||||||
from ..ext.ghostscript import Ghostscript
|
|
||||||
from ..utils import (scale_image, scale_pdf, segments_in_bbox, text_in_bbox,
|
from ..utils import (scale_image, scale_pdf, segments_in_bbox, text_in_bbox,
|
||||||
merge_close_lines, get_table_index, compute_accuracy,
|
merge_close_lines, get_table_index, compute_accuracy,
|
||||||
compute_whitespace)
|
compute_whitespace)
|
||||||
@@ -184,6 +183,8 @@ class Lattice(BaseParser):
|
|||||||
return t
|
return t
|
||||||
|
|
||||||
def _generate_image(self):
|
def _generate_image(self):
|
||||||
|
from ..ext.ghostscript import Ghostscript
|
||||||
|
|
||||||
self.imagename = ''.join([self.rootname, '.png'])
|
self.imagename = ''.join([self.rootname, '.png'])
|
||||||
gs_call = '-q -sDEVICE=png16m -o {} -r300 {}'.format(
|
gs_call = '-q -sDEVICE=png16m -o {} -r300 {}'.format(
|
||||||
self.imagename, self.filename)
|
self.imagename, self.filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user