Re: PrintTextLocations 1.8 vs 2.0

2016-03-30 Thread Peter Prusinowski
Sorry for the late response. I tested the code with severel documents and it works well :-) Thank you very much. Am 17.03.2016 um 18:07 schrieb Tilman Hausherr: I found a case where the strategy you mentioned didn't work for a TT font, the file 032431. Here's some updated code. private

Re: PrintTextLocations 1.8 vs 2.0

2016-03-19 Thread Tilman Hausherr
I found a case where the strategy you mentioned didn't work for a TT font, the file 032431. Here's some updated code. private Shape calculateGlyphBounds(Matrix textRenderingMatrix, PDFont font, int code) throws IOException { GeneralPath path = null; AffineTransform at

Re: PrintTextLocations 1.8 vs 2.0

2016-03-19 Thread Tilman Hausherr
Am 16.03.2016 um 09:52 schrieb Peter Prusinowski: thank you for the hints, now I am overwriting showGlyph() and trying to get the value with PDSimpleFont sf = (PDSimpleFont) font; String name = sf.getEncoding().getName(code); sf.getPath(name).getBounds()

Re: PrintTextLocations 1.8 vs 2.0

2016-03-16 Thread Andreas Lehmkühler
Hi, > Peter Prusinowski hat am 16. März 2016 um 09:52 > geschrieben: > > > Good morning, > > thank you for the hints, now I am overwriting showGlyph() and trying to > get the value with > > PDSimpleFont sf = (PDSimpleFont) font; > String name =

Re: PrintTextLocations 1.8 vs 2.0

2016-03-16 Thread Peter Prusinowski
Good morning, thank you for the hints, now I am overwriting showGlyph() and trying to get the value with PDSimpleFont sf = (PDSimpleFont) font; String name = sf.getEncoding().getName(code); sf.getPath(name).getBounds() but I am getting the same height, no

Re: PrintTextLocations 1.8 vs 2.0

2016-03-07 Thread Tilman Hausherr
Am 07.03.2016 um 11:46 schrieb Peter Prusinowski: Okay, thank you for information. I tried to get the height with getPath(). If its one of the 14 standard fonts, I can get the height with PDType1Font.fontName.getPath(text.getUnicode()).getBounds()). But I dont know how to get the information

Re: PrintTextLocations 1.8 vs 2.0

2016-03-07 Thread Peter Prusinowski
Okay, thank you for information. I tried to get the height with getPath(). If its one of the 14 standard fonts, I can get the height with PDType1Font.fontName.getPath(text.getUnicode()).getBounds()). But I dont know how to get the information from other fonts in a generic way. Do you have a

Re: PrintTextLocations 1.8 vs 2.0

2016-03-03 Thread Tilman Hausherr
Am 03.03.2016 um 09:11 schrieb Peter Prusinowski: Okay, I am trying to replace some words in documents and use text.height to "delete" these words. Here is an example document : http://workupload.com/file/G8ipDe8j The getHeightDir() is not the best strategy, for the reason I mentioned

Re: PrintTextLocations 1.8 vs 2.0

2016-03-03 Thread Peter Prusinowski
Okay, I am trying to replace some words in documents and use text.height to "delete" these words. Here is an example document : http://workupload.com/file/G8ipDe8j Peter Am 02.03.2016 um 19:24 schrieb Tilman Hausherr: Am 02.03.2016 um 14:48 schrieb Peter Prusinowski: Hello, I have noticed

Re: PrintTextLocations 1.8 vs 2.0

2016-03-02 Thread Tilman Hausherr
Am 02.03.2016 um 14:48 schrieb Peter Prusinowski: Hello, I have noticed that the PrintTextLocations example in 1.8 and 2.0 gives different results for text.getHeightDir(). In 1.8 the value seems to be right, but in 2.0 it is too small. I tried with some PDFBox created documents. Is this a