Thanks for your answers.

I have tried the changes in DrawTextLocations and the box is better. Of course, 
possibly due to the negative bbox and wrong font information, the cyan box  is 
still different than the real bbox but I understand that this is the best 
approach by now.


Esteban






________________________________
De: Tilman Hausherr <thaush...@t-online.de>
Enviado: sábado, 01 de julio de 2017 09:21 a.m.
Para: users@pdfbox.apache.org
Asunto: Re: Box issue with type3 font

Done
https://issues.apache.org/jira/browse/PDFBOX-3850

And yes, the negative bbox is also a problem... this font is completely
wrong.

Tilman

Am 30.06.2017 um 15:43 schrieb Esteban R:
> Tilman: thanks for your answer! 
> (https://lists.apache.org/thread.html/a6f20d16b76acbfe4c292bc2d0e7111de9173c7cd63aae330df3886a@%3Cusers.pdfbox.apache.org%3E)
>  .
>
> For some reason your answer didn't arrive to my e-mail account although other 
> e-mails from users@pdfbox.apache.org arrive ok :s .
>
>> To get a perfect bounding box for the cyan rectangle, the only thing one
>> could do would be to evaluate the content stream in the charproc:
>
> We will ignore the issue by now, but in case we decide to implement a 
> solution in the future... maybe we can just create a "mock" document with the 
> content stream, render it with PDFImageWriter.writeImage and then find the 
> bounding box in the resulting image?
>
>
> Esteban
>
>
>
>
> ________________________________
> De: Esteban R <eru...@hotmail.com>
> Enviado: jueves, 29 de junio de 2017 02:20 p.m.
> Para: users@pdfbox.apache.org
> Asunto: Box issue with type3 font
>
>
> Hello. I'm using DrawPrintTextLocations.java (from 
> http://svn.apache.org/repos/asf/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/DrawPrintTextLocations.java)
>
> to find the boxes for a character in the following pdf (a simplified version 
> of a real life pdf):
>
> http://wikisend.com/download/727732/boxissue_type3_font.pdf
>
> but none of the boxes matches the printed character (see near the bottom of 
> the page).
>
> This is the output that I get:
>
> http://wikisend.com/download/129910/boxissue_type3_font-marked-1.png

>
>
> I have noticed that some values in the font have negative values... so I 
> don't know if the file (or font) is corrupted or there is an issue in pdfbox 
> (or in DrawPrintTextLocations). How can I get a tightly enclosing box for the 
> character?
>
>
> Esteban
>


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

Reply via email to