fix: add lossless_reconstruction to namespace options in PdfContext

Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
James R. Barlow
2025-12-21 12:21:47 -08:00
co-authored by aider
parent aad90bcb54
commit 0c3110857e
+5 -1
View File
@@ -42,7 +42,11 @@ class PdfContext:
else:
# Convert Namespace to OCROptions
self.options = OCROptions.from_namespace(options)
self._namespace_options = options
self._namespace_options = self.options.to_namespace()
# Ensure lossless_reconstruction is available on the namespace
if not hasattr(self._namespace_options, 'lossless_reconstruction'):
self._namespace_options.lossless_reconstruction = self.options.lossless_reconstruction
self.work_folder = work_folder
self.origin = origin
self.pdfinfo = pdfinfo