Hi, Am 19.07.2013 09:34, schrieb Pradhan C N:
Hi all, I am using PDFBox 1.8.2 PDFTextStripper. I noticed that if the pdf file has Cambria font the height of the text position is completely wrong. It turns out that the height is exactly 4 times the actual height. I have attached the test pdf file I used and also find below the output from my
Due to some restrictions your pdf didn't make it. Please send either a link to a download location (shared hoster or something similar) or create an issue on JIRA [1] and attach the pdf in question.
program for each char in the pdf. Its a simple pdf which has the word cambria in different font sizes. I have tested with all other fonts and it gives me perfect height but why cambria fails ? Font size 2 C getHeightDir() 5.3568 getYScale() 1.92 getFont().getFontBoundingBox().getHeight() 5580.0 a getHeightDir() 5.3568 getYScale() 1.92 getFont().getFontBoundingBox().getHeight() 5580.0 m getHeightDir() 5.3568 getYScale() 1.92 getFont().getFontBoundingBox().getHeight() 5580.0 b getHeightDir() 5.3568 getYScale() 1.92 getFont().getFontBoundingBox().getHeight() 5580.0 r getHeightDir() 5.3568 getYScale() 1.92 getFont().getFontBoundingBox().getHeight() 5580.0 i getHeightDir() 5.3568 getYScale() 1.92 getFont().getFontBoundingBox().getHeight() 5580.0 a getHeightDir() 5.3568 getYScale() 1.92 getFont().getFontBoundingBox().getHeight() 5580.0 SNIP
Thanks, Pradhan
BR Andreas Lehmkühler [1] https://issues.apache.org/jira/browse/PDFBOX

