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 [email protected] 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 <[email protected]>
Enviado: jueves, 29 de junio de 2017 02:20 p.m.
Para: [email protected]
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

Reply via email to