Permalink
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (43 sloc) 870 Bytes
metadata:
title: Optical character recognition in the background
short title: OCR
documentation: "https://docassemble.org/docs/functions.html#ocr_file_in_background"
example start: 2
example end: 6
---
modules:
- docassemble.base.util
---
mandatory: true
code: |
the_files
if the_task.ready():
final_screen
else:
waiting_screen
---
code: |
the_task = ocr_file_in_background(the_files, 'refresh')
---
event: waiting_screen
question: |
Please wait.
subquestion: |
Your document is being processed.
This may take several minutes.
The text of your document will be
shown on the screen when the
processing is finished.
---
event: final_screen
question: |
Here is the text of the uploaded
file.
subquestion: |
${ the_task.get() }
---
question: |
Please upload one or more files.
fields:
- File: the_files
datatype: files