[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with Search Results of PDFDocument-Class
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: Re: Problem with Search Results of PDFDocument-Class
- From: BB <adamnt42@xxxxxxxxx>
- Date: Sun, 1 Sep 2024 14:05:37 +0930
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 1/9/24 2:07 am, Claus Dietrich wrote:
Strange! I was working on that exact same thing over the last couple of days.HiI am working on PDF-based help-viewer. When I tried to implement a search function I found that the number of hits for each page are correct, but the locations, which are returned for each page as RectF array, have nothing to do with the reality.All attempts to transform the RectF results to something usable failed. Is there anything special I need to consider or do we have a bug here?I attached the current state of the project. Just start it, click on the search button and enter the search expression (i.e. 'ipsum') and press Enter. The locations of hits are marked as red rectangle.With best regards Claus
I guess you realise that the co-ordinate realms of the DocumentViewer and the pdf RectF are completely different. I guess we need to determine a range based on the topmost-leftmost character and the bottommost-rightmost character position (as the last line may not be as wide) for both realms and work out a conversion from there.
It may also help to understand how DocumentViewer renders a pdf document. Which I dont.
b
Re: Problem with Search Results of PDFDocument-Class | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |
Re: Problem with Search Results of PDFDocument-Class | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |