Merge branch 'dev' into feature-tika-plugin-conversion

This commit is contained in:
Trenton H
2026-03-13 15:11:13 -07:00
committed by GitHub
4 changed files with 115 additions and 8 deletions
+2 -2
View File
@@ -221,7 +221,7 @@ class RasterisedDocumentParser(DocumentParser):
if TYPE_CHECKING:
assert isinstance(self.settings, OcrConfig)
ocrmypdf_args = {
"input_file": input_file,
"input_file_or_options": input_file,
"output_file": output_file,
# need to use threads, since this will be run in daemonized
# processes via the task library.
@@ -285,7 +285,7 @@ class RasterisedDocumentParser(DocumentParser):
"for compatibility with img2pdf",
)
# Replace the input file with the non-alpha
ocrmypdf_args["input_file"] = self.remove_alpha(input_file)
ocrmypdf_args["input_file_or_options"] = self.remove_alpha(input_file)
if dpi:
self.log.debug(f"Detected DPI for image {input_file}: {dpi}")
+1 -1
View File
@@ -778,7 +778,7 @@ class TestParser(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
safe_fallback=False,
)
self.assertEqual(params["input_file"], "input.pdf")
self.assertEqual(params["input_file_or_options"], "input.pdf")
self.assertEqual(params["output_file"], "output.pdf")
self.assertEqual(params["sidecar"], "sidecar.txt")