Search

Extract Image

Last Updated: Feb 14, 2022

Articles

Use this function to extract the image of the region in the PDF specified by the given selectors.

Syntax

Extract Image (fid, left, top, right, bottom, page_number, image_format)

Parameters

Input Parameter Name Description
fid OutputXmlFID passed from the Doc Reader node
left A keyword to the left of the image
top A keyword above the image
right A keyword to the right of the image
bottom A keyword below the image
page_number The page number to extract image from
Provide 0 to search across all pages
image_format Image format for saving
Example: TIFF, JPG, GIF, PNG, and JPEG

  • 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
Path Path of the output file

Sample

Extract Image (FID, 25/01/2021, Description, City, Cust1234, 2, JPG)

  • Extracts the image from PDF having File ID FID.
  • The image 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.
  • The image is saved as a JPG file.
    Returns the path where the output document is stored.

  • 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?