I'm trying to use the output of AWS Textract (OCR) to rebuild a text document from the scan of a (non-text) PDF. I have an array of lines of text on the page with offset positions, so I think it would be possible to simply position these as several (many) TextPaths.
I then want to allow a user to select portions of one or more TextPaths to "highlight." For highlighting, it could be simply a Rect overlaid on text with an opacity to appear as a highlighted box. Imagine Google Docs or Word, but for highlighted text.
Any ideas on how I can achieve or approach drawing multiple Rects over the TextPath objects to appear as highlighting? Any demos of text highlighting or the like?