Skip to main content

Read text from image URL

Download an image or a PDF from an http or https address and extract its text, optionally keeping only the text between two markers.

Command in the OCR toolkit · id ooa.ocr/read_url · 11 inputs (1 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
Address (URL)StringYesAddress of the image.
LanguageStringNoengTesseract language(s), e.g. eng, deu or eng+fra.
Page modeNumberNo3Page layout mode: 3 automatic, 6 single block, 7 single line, 11 sparse text.
After textStringNoKeep only the text after the first occurrence of this marker, e.g. Invoice number:.
Before textStringNoKeep only the text before this marker (searched after the after_text marker).
TrimBooleanNotrueRemove spaces and line breaks at the start and end of the result.
ScaleNumberNo1Enlarge the image by this factor (1 to 5) before reading; 2 or 3 helps with small text.
Image modeStringNononePrepare the image: none, gray, or black_white (a simple threshold that often helps with coloured backgrounds).
Timeout (seconds)NumberNo60Maximum time for the download.
PasswordCredentialNoA PDF's password (G4).
PagesStringNoA PDF's pages to read, e.g. 1,3,5-7; every page when empty (G4).

Outputs​

OutputTypeWhat it is
textStringRecognised text.