diff --git a/document_preview/document_preview.py b/document_preview/document_preview.py index 4ef9000..d7dad04 100644 --- a/document_preview/document_preview.py +++ b/document_preview/document_preview.py @@ -158,6 +158,12 @@ def execute(self, request): ocr_heuristic_id=ocr_heur_id, ocr_io=ocr_io, ) + if request.get_param("analyze_render"): + request.add_extracted( + f"{self.working_directory}/{preview}", + name=img_name, + description=f"Here's the preview for page {i}", + ) if request.file_type == "document/pdf": with open(ocr_io.name, "r") as fp: diff --git a/service_manifest.yml b/service_manifest.yml index 857352a..7debda1 100644 --- a/service_manifest.yml +++ b/service_manifest.yml @@ -34,6 +34,11 @@ submission_params: value: false default: false + - name: analyze_render + type: bool + value: false + default: false + - name: save_ocr_output type: list value: "no"