Search

Extract Text In Area

Last Updated: Dec 28, 2022

Articles

Use this function to extract text from regions based on the given selectors.

Syntax

Extract Text In Area (fid, left, top, right, bottom, page_number, text_format)

Parameters

Input Parameter Name Description
fid OutputXmlFID passed from the Doc Reader node
left A keyword to the left of the specific text area
top A keyword above the specific text area
right A keyword to the right of the specific text area
bottom A keyword below the specific text area
across_pages
  • true: If keywords span across the pages
  • false: If keywords are present on the same page

  • Use NA for the parameters where you do not want to specify a keyword. In this case, the area till the end of the page is considered.
  • You can specify NA in a maximum of three fields.

Returns

Return Value Description
Text Extracted text

Sample

Extract Text In Area (FID, 25/01/2021, Description, City, Cust1234, false)

  • Extracts the text from PDF having File ID FID.
  • The text extracted will be the one to the right of the keyword 25/01/2021, below Description, left of City, and above Cust1234 from the second page of the PDF.
    Returns the extracted text.

  • If a keyword you have specified does not have a match in the PDF, then an error Failed to find any area matching given criteria is displayed.
  • The path and the name of the output file are automatically assigned by the function.

To view all the Document functions, click here.

Did you find what you were looking for?