You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Esteban R <er...@hotmail.com> on 2018/02/08 21:45:45 UTC

DrawPrintTextLocations doesn't match character box

Hello. The boxes drawn with DrawPrintTextLocations for the following PDF file (simplification of a real-life doc) are not what I expected (they contain a lot of white space): http://www.filedropper.com/minimunsample
See the output here: http://www.filedropper.com/minimunsample-marked-1

Please note: if I select the text in Adobe Reader, the selection is bigger than expected, too.

What is wrong? Can I somehow get the smaller box that encloses the char or, at least, tell that something is wrong?

The font is a Type3 font.

Esteban


RE: DrawPrintTextLocations doesn't match character box

Posted by Esteban R <er...@hotmail.com>.
Thanks Tilman!

Esteban
________________________________
De: Tilman Hausherr <TH...@t-online.de>
Enviado: jueves, 08 de febrero de 2018 09:58 p.m.
Para: users@pdfbox.apache.org
Asunto: Re: DrawPrintTextLocations doesn't match character box

Hi,

One can't get the bounding box from a path because it's a PDF stream.
All we have there is the first PDF operator from the charproc, here:
"0.602 0 -0.35 -0.968 0.734 1.075 d1". If that one is incorrect... too bad.

Tilman

Am 08.02.2018 um 22:45 schrieb Esteban R:
> Hello. The boxes drawn with DrawPrintTextLocations for the following PDF file (simplification of a real-life doc) are not what I expected (they contain a lot of white space): http://www.filedropper.com/minimunsample
> See the output here: http://www.filedropper.com/minimunsample-marked-1
>
> Please note: if I select the text in Adobe Reader, the selection is bigger than expected, too.
>
> What is wrong? Can I somehow get the smaller box that encloses the char or, at least, tell that something is wrong?
>
> The font is a Type3 font.
>
> Esteban
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: DrawPrintTextLocations doesn't match character box

Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,

One can't get the bounding box from a path because it's a PDF stream. 
All we have there is the first PDF operator from the charproc, here: 
"0.602 0 -0.35 -0.968 0.734 1.075 d1". If that one is incorrect... too bad.

Tilman

Am 08.02.2018 um 22:45 schrieb Esteban R:
> Hello. The boxes drawn with DrawPrintTextLocations for the following PDF file (simplification of a real-life doc) are not what I expected (they contain a lot of white space): http://www.filedropper.com/minimunsample
> See the output here: http://www.filedropper.com/minimunsample-marked-1
>
> Please note: if I select the text in Adobe Reader, the selection is bigger than expected, too.
>
> What is wrong? Can I somehow get the smaller box that encloses the char or, at least, tell that something is wrong?
>
> The font is a Type3 font.
>
> Esteban
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org