How to extract textbox text? #776
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The method is But you can still extract annotation / field contents, just with another set of methods: |
Beta Was this translation helpful? Give feedback.
-
Awesome! Thank you very much! |
Beta Was this translation helpful? Give feedback.
The method is
page.getTextbox(rect)
.But it seems in your example, some text pieces are not page text, but annotation or widget / field text. That text would of course not be included, because annotations (including fields / widgets) are not part of the page. You can imagine these like "dust" on a picture - can be wiped away without chaging the picture itself.
But you can still extract annotation / field contents, just with another set of methods:
You have to extract annot / field text separately, by first checking which fields / annotations are inside the given rect, and then extracting the text from them.