diff --git a/camelot/parsers/lattice.py b/camelot/parsers/lattice.py index 5469fac..3f2c0e9 100644 --- a/camelot/parsers/lattice.py +++ b/camelot/parsers/lattice.py @@ -211,7 +211,7 @@ class Lattice(BaseParser): from ..ext.ghostscript import Ghostscript self.imagename = "".join([self.rootname, ".png"]) - gs_call = "-q -sDEVICE=png16m -o {} -r300 {}".format( + gs_call = "-q -sDEVICE=png16m -o {} -r900 {}".format( self.imagename, self.filename ) gs_call = gs_call.encode().split() @@ -329,6 +329,7 @@ class Lattice(BaseParser): table = Table(cols, rows) # set table edges to True using ver+hor lines + table = table.set_edges(v_s, h_s, joint_tol=self.joint_tol) # set table border edges to True table = table.set_border() diff --git a/camelot/plotting.py b/camelot/plotting.py index 473ad13..640d373 100644 --- a/camelot/plotting.py +++ b/camelot/plotting.py @@ -48,7 +48,7 @@ class PlotMethods(object): if filename is not None: fig.savefig(filename) return None - + return fig def text(self, table): diff --git a/camelot/utils.py b/camelot/utils.py index 2126fbb..545370d 100644 --- a/camelot/utils.py +++ b/camelot/utils.py @@ -93,7 +93,6 @@ def download_url(url): return filepath -stream_kwargs = ["columns", "edge_tol", "row_tol", "column_tol"] lattice_kwargs = [ "process_background", "line_scale", @@ -106,6 +105,7 @@ lattice_kwargs = [ "iterations", "resolution", ] +stream_kwargs = ["columns", "edge_tol", "row_tol", "column_tol"] def validate_input(kwargs, flavor="lattice"): @@ -116,14 +116,14 @@ def validate_input(kwargs, flavor="lattice"): f"{','.join(sorted(isec))} cannot be used with flavor='{flavor}'" ) - if flavor == "lattice": + if flavor in ["lattice", "lattice_ocr"]: check_intersection(stream_kwargs, kwargs) else: check_intersection(lattice_kwargs, kwargs) def remove_extra(kwargs, flavor="lattice"): - if flavor == "lattice": + if flavor in ["lattice", "lattice_ocr"]: for key in kwargs.keys(): if key in stream_kwargs: kwargs.pop(key)