1. An image processing apparatus comprising: an object extraction unit configured to extract an object from an input image; a metadata extraction unit configured to extract metadata related to the object; a determination unit configured to determine whether to describe a vector path description of frame with a shape in accordance with a shape of the object or to describe a vector path description of frame with a shape in accordance with a predetermined shape; a frame creation unit configured to create a vector path description of frame described with a shape in accordance with the shape of the object when the determination unit determines to describe with a shape in accordance with the shape of the object, and create a vector path description of frame described with a shape in accordance with the predetermined shape when the determination unit determines to describe with a shape in accordance with the predetermined shape; and a document creation unit configured to create an electronic document including data of the input image and the vector path description of frame with which the metadata is associated, wherein when a keyword search is performed on the electronic document, highlight display is performed in accordance with the vector path description of frame with which metadata that matches the keyword is associated.