Hi David, Am Mittwoch, dem 24.08.2022 um 11:59 +0100 schrieb David Goodenough: > I am using PDFStripper (from PDFBox 2.0.26) to annotate (by drawing a > coloured > box around each relevant piece of text) an image of a PDF document. > > The internal details in the TextPosition would be sufficient for the > purpose, but > the exposed details are not. In particular there is not way (that I > have found) to > get the size of a box around the text that includes the descenders. > I can > aggregate all the x,y,height and width data to create an overall box, > but it only > goes down to the baseline.
did you take a look at DrawPrintTextLocations in the examples package? Should maybe give you some hints. > > The PDFont value in the TextPosition has the maximum descender depth > (if I > recall correctly) but is private and there is no getter either for > the descender > depth or the PDFont value from which it could be calculated. > > Have I missed something, or could the TextPosition class be extended > to add > access to either the descender depth, the font or preferably both? BR Maruan --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org