Details
Description
I'm unable to retrieve any text from PDF files using the .getSelection() method from QPdfDocument. The QPdfSelection returned is always empty for me (that is: It has an empty .text() and empty boundingRectangle), no matter what I chose as start and end point. Am I doing something wrong? Other methods like getAllText() or getSelectionAtIndex() work fine, so I guess it's not the fault of the pdf files I've tried or a general mistake in creating the QPdfDocument...
Here is some minimal example. I've not found any pdf that works, so I've not included any example pdf - the error seemed to be generic.
from PySide6.QtCore import QPointF
from PySide6.QtPdf import QPdfDocument
doc = QPdfDocument(None)
doc.load(r"path-to-some.pdf")
page = 10
print("############### get all ###############")
all = doc.getAllText(page)
print(all.text()) # this works just fine
print(all.boundingRectangle())
print("############### getSelection ###############")
selection = doc.getSelection(page, QPointF(11, 49), QPointF(537, 705))
print(selection.text()) # this is always empty
print(selection)