Patent ID: 8386943

Claim:
A method for query based on layout information, comprising: setting up a query condition which is a visible attribute specified by a user, wherein the visible attribute is one of character font, character size, character color, character filling style, character outline style, special effect of character, graphic shape, graphic size, graphic filling style and graphic outline style, image shape, image size, image color and image format, object position and object coordinate conversion; obtaining layout information of an electronic document in a computer readable storage medium, wherein the layout information of the electronic document includes description of visible attributes of one or more objects in the electronic document, wherein each of the objects is one of a text, a graphics, and an image; and querying the electronic document for the object having the visible attribute that matches the description in the query condition specified by the user based on the layout information obtained; wherein, obtaining layout information of the electronic document and querying in the electronic document for an object which is one of a text or a graphic or an image having the visible attribute comprise: obtaining the layout information of all required objects in the electronic document; establishing an index according to the layout information obtained, and determining whether the at least one object has the visible attribute by utilizing the index.