pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joël Kuiper <j...@joelkuiper.eu>
Subject Add highlight/annotation to known string of text within a PDF
Date Tue, 02 Sep 2014 13:47:35 GMT

I’m sure this has been asked before, but I could not find a straight-forward answer. 

The problem is that I have a PDF for which I want to highlight a known string with a color.

Similar to the way Adobe Reader or Preview allows you to drag the mouse to create an annotation,
but in this case I know the string in advance. 
The string can span multiple lines, even in multi-column documents — but can be assumed
consecutive within the extracted text. 

Most of the annotation tools need quads (bounding boxes), but I’m unsure how to get those
for a arbitrary string. 

Any pointers on this? 

Kind regards, 
View raw message