Skip to content
Discussion options

You must be logged in to vote

BTW, the bbox heights of both spans are the same:

for b in page.get_text("dict",sort=True)["blocks"]:
    for l in b["lines"]:
        for s in l["spans"]:
            bbox=fitz.Rect(l["bbox"])
            print(bbox.height, s["size"], s["text"])

            
13.31008529663086 9.962639808654785 Thus, I came to the conclusion that the designer of a ne
13.31008529663086 9.892655372619629 Thus, I came to the conclusion that the designer of a new

If you use fitz.TOOLS.set_small_glyph_heights(True) you get this:

fitz.TOOLS.set_small_glyph_heights(True)
True
for b in page.get_text("dict",sort=True)["blocks"]:
    for l in b["lines"]:
        for s in l["spans"]:
            bbox=fitz.Rect(l["b…

Replies: 4 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@zhichu
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@zhichu
Comment options

@JorjMcKie
Comment options

Answer selected by zhichu
Comment options

You must be logged in to vote
3 replies
@zhichu
Comment options

@buptyyf
Comment options

@JorjMcKie
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1778 on June 27, 2022 07:53.