Skip to main content

Get Text From Rectangle With OCR

This activity extracts text from a specified rectangular area in a PDF document using OCR, provided as a memory stream.

Core Functions

  • Reads the PDF file from the provided memory stream.
  • Extracts all embedded images from the specified rectangle on the given page.
  • Applies OCR processing to detect and recognize text.
  • Returns the extracted text as output.

Inputs

  • PdfMemoryStream:Represents the source PDF file in memory stream format.
    Type: MemoryStream

  • Page Index:Specifies the page number to extract text from.
    Type: Integer

  • X0:Specifies the left coordinate of the rectangle.
    Type: Float

  • X1:Specifies the right coordinate of the rectangle.
    Type: Float

  • Y0:Specifies the top coordinate of the rectangle.
    Type: Float

  • Y1:Specifies the bottom coordinate of the rectangle.
    Type: Float

Outputs

  • Output:The text extracted from the specified rectangular area of the PDF page using OCR.
    Type: String

Short Technical Summary

Extracts text from a defined rectangle in a PDF memory stream using OCR based on page index and coordinates, and returns it as plain text.