> On 29 Jan 2016, at 06:46, Branden Visser <[email protected]> wrote: > > Hi everyone, > > I thought we had a process to get the visual bounds of a character > sealed, until we bumped into a few more PDF documents where the > bounding box we calculating is way bigger than the character itself > (about double the size). We're using the 2.0.0-SNAPSHOT code, but > we've verified this occurs in both RC2 and RC3.
Assuming that you’re using PDFont#getPath(..) then you should be able to measure the visual bounds of a glyph accurately. > I've written a gist with a Scala/Java-ish sample of our calculation > [1], where the TextPosition being passed in is the one provided by > PDFTextStripper in processTextPosition (I know it's inaccurate, but > we're only using the text rendering matrix from it which I think > should be accurate?) > I'm assuming you may need more information, but first I'm considering > that our logic for getting the bounds is missing some important pieces > that jump out at you all. > > Is the gist correct? I’ve commented on your gist on GitHub. You’ve mostly got it right but you want to end up with device space, not user space. — John > Thanks, > Branden > > [1] https://gist.github.com/anonymous/063db3b1b5ed040be41c > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

