mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Adds more documentation for OCR_PAGES and prevents using 0 for actual OCR (#5275)
This commit is contained in:
parent
ee2bfe2350
commit
9043f45350
@ -665,11 +665,13 @@ completely.
|
|||||||
|
|
||||||
Specifying 1 here will only use the first page.
|
Specifying 1 here will only use the first page.
|
||||||
|
|
||||||
|
The value must be greater than or equal to 1 to be used.
|
||||||
|
|
||||||
When combined with `PAPERLESS_OCR_MODE=redo` or
|
When combined with `PAPERLESS_OCR_MODE=redo` or
|
||||||
`PAPERLESS_OCR_MODE=force`, paperless will not modify any text it
|
`PAPERLESS_OCR_MODE=force`, paperless will not modify any text it
|
||||||
finds on excluded pages and copy it verbatim.
|
finds on excluded pages and copy it verbatim.
|
||||||
|
|
||||||
Defaults to 0, which disables this feature and always uses all
|
Defaults to unset, which disables this feature and always uses all
|
||||||
pages.
|
pages.
|
||||||
|
|
||||||
#### [`PAPERLESS_OCR_IMAGE_DPI=<num>`](#PAPERLESS_OCR_IMAGE_DPI) {#PAPERLESS_OCR_IMAGE_DPI}
|
#### [`PAPERLESS_OCR_IMAGE_DPI=<num>`](#PAPERLESS_OCR_IMAGE_DPI) {#PAPERLESS_OCR_IMAGE_DPI}
|
||||||
@ -683,7 +685,7 @@ fails, it uses this value as a fallback.
|
|||||||
|
|
||||||
Set this to the DPI your scanner produces images at.
|
Set this to the DPI your scanner produces images at.
|
||||||
|
|
||||||
Default is none, which will automatically calculate image DPI so
|
Defaults to unset, which will automatically calculate image DPI so
|
||||||
that the produced PDF documents are A4 sized.
|
that the produced PDF documents are A4 sized.
|
||||||
|
|
||||||
#### [`PAPERLESS_OCR_MAX_IMAGE_PIXELS=<num>`](#PAPERLESS_OCR_MAX_IMAGE_PIXELS) {#PAPERLESS_OCR_MAX_IMAGE_PIXELS}
|
#### [`PAPERLESS_OCR_MAX_IMAGE_PIXELS=<num>`](#PAPERLESS_OCR_MAX_IMAGE_PIXELS) {#PAPERLESS_OCR_MAX_IMAGE_PIXELS}
|
||||||
|
@ -238,7 +238,7 @@ class RasterisedDocumentParser(DocumentParser):
|
|||||||
ocrmypdf_args["rotate_pages"] = True
|
ocrmypdf_args["rotate_pages"] = True
|
||||||
ocrmypdf_args["rotate_pages_threshold"] = self.settings.rotate_threshold
|
ocrmypdf_args["rotate_pages_threshold"] = self.settings.rotate_threshold
|
||||||
|
|
||||||
if self.settings.pages is not None:
|
if self.settings.pages is not None and self.settings.pages > 0:
|
||||||
ocrmypdf_args["pages"] = f"1-{self.settings.pages}"
|
ocrmypdf_args["pages"] = f"1-{self.settings.pages}"
|
||||||
else:
|
else:
|
||||||
# sidecar is incompatible with pages
|
# sidecar is incompatible with pages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user