import fitz
doc = fitz.open(""
List item
)
for page in doc: print(page.search_for("Bank Account"))
this program is for get dimensions of given text. i want to do reverse of it, find text using its dimensions.
1.) First get the rectangular coordinates rect(x_0,y_0,x_1,y_1)
of the text you want to extract.
2.) Use the syntax Page.get_text("text",clip=rect)
. Place you rectangular coordinates into the clip.
For more go to the link.