mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-19 10:19:27 -05:00
fixes #218
This commit is contained in:
parent
17ded12375
commit
713985f259
@ -117,6 +117,7 @@ def run_convert(input_file,
|
|||||||
trim=False,
|
trim=False,
|
||||||
type=None,
|
type=None,
|
||||||
depth=None,
|
depth=None,
|
||||||
|
auto_orient=False,
|
||||||
extra=None,
|
extra=None,
|
||||||
logging_group=None):
|
logging_group=None):
|
||||||
|
|
||||||
@ -134,6 +135,7 @@ def run_convert(input_file,
|
|||||||
args += ['-trim'] if trim else []
|
args += ['-trim'] if trim else []
|
||||||
args += ['-type', str(type)] if type else []
|
args += ['-type', str(type)] if type else []
|
||||||
args += ['-depth', str(depth)] if depth else []
|
args += ['-depth', str(depth)] if depth else []
|
||||||
|
args += ['-auto-orient'] if auto_orient else []
|
||||||
args += [input_file, output_file]
|
args += [input_file, output_file]
|
||||||
|
|
||||||
logger.debug("Execute: " + " ".join(args), extra={'group': logging_group})
|
logger.debug("Execute: " + " ".join(args), extra={'group': logging_group})
|
||||||
|
@ -60,6 +60,7 @@ class RasterisedDocumentParser(DocumentParser):
|
|||||||
alpha="remove",
|
alpha="remove",
|
||||||
strip=True,
|
strip=True,
|
||||||
trim=False,
|
trim=False,
|
||||||
|
auto_orient=True,
|
||||||
input_file="{}[0]".format(document_path),
|
input_file="{}[0]".format(document_path),
|
||||||
output_file=out_path,
|
output_file=out_path,
|
||||||
logging_group=self.logging_group)
|
logging_group=self.logging_group)
|
||||||
@ -84,6 +85,7 @@ class RasterisedDocumentParser(DocumentParser):
|
|||||||
alpha="remove",
|
alpha="remove",
|
||||||
strip=True,
|
strip=True,
|
||||||
trim=False,
|
trim=False,
|
||||||
|
auto_orient=True,
|
||||||
input_file=gs_out_path,
|
input_file=gs_out_path,
|
||||||
output_file=out_path,
|
output_file=out_path,
|
||||||
logging_group=self.logging_group)
|
logging_group=self.logging_group)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user