mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
Convert Density
Add settings variable for the convert density setting. If no variable is set, default to 300.
This commit is contained in:
parent
a0d268ebbc
commit
52c5aafb3f
2 changed files with 3 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ class Consumer(object):
|
|||
UNPAPER = settings.UNPAPER_BINARY
|
||||
CONSUME = settings.CONSUMPTION_DIR
|
||||
THREADS = int(settings.OCR_THREADS) if settings.OCR_THREADS else None
|
||||
DENSITY = int(settings.CONVERT_DENSITY) if settings.CONVERT_DENSITY else 300
|
||||
|
||||
DEFAULT_OCR_LANGUAGE = settings.OCR_LANGUAGE
|
||||
|
||||
|
|
@ -158,7 +159,7 @@ class Consumer(object):
|
|||
pnm = os.path.join(tempdir, "convert-%04d.pnm")
|
||||
run_convert(
|
||||
self.CONVERT,
|
||||
"-density", "300",
|
||||
"-density", self.DENSITY,
|
||||
"-depth", "8",
|
||||
"-type", "grayscale",
|
||||
doc, pnm,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue