I have coordinate details but im unable to find any method is pymupdf or to fetch block of data based on the coordinates. Is there any method in pymupdf that is able to do it? Im open to other libraries also but i already used PDFQuery which is not working properly.
Explanation: I want to read block of text with in the given coordinates using pymupdf. for example, if i have coordinates x0, y0, x1, y1 i should be able to getthe text with in the block the same format as in pdf
for example: if i do
print(page.get_textbox(fitz.Rect([40.91999816894531, 274.94500732421875, 349.88214111328125, 364.9531555175781])))
it is giving me string with each word in that block separated by new line. Is there a way i can get the block as the same format as in PDF.
from using pdfminer how can i able to get text based on coordinates as same format as in pdf
No comments:
Post a Comment