Replies: 3 comments 6 replies
-
below setting seems a little better, but don't know whether it is the best option fontsize = int((bottom - top)*0.8) |
Beta Was this translation helpful? Give feedback.
-
You should try to use the origin of the span that is delivered on text extraction. This value depends on the font. Look at this picture in the documentation. |
Beta Was this translation helpful? Give feedback.
-
How to set origin? a = span["ascender"] r now is a rectangle of height 'fontsize' |
Beta Was this translation helpful? Give feedback.
-
How is pos calculated for TextWriter? The place seems not correct.
tw.append((left, top), text, fontsize=fontsize_fit, font=font, small_caps=True)
tw.append((left, top+fontsize), text, fontsize=fontsize_fit, font=font, small_caps=True)
Beta Was this translation helpful? Give feedback.
All reactions