pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hesham Gneady" <heshamgne...@gmail.com>
Subject Getting font size of letters
Date Sun, 06 Jan 2019 09:26:27 GMT
Hello ,

 

In this PDF sample:

https://www.dropbox.com/s/9kpm0jmb6h3mrhy/Font%20Size%20Sample.pdf?dl=0

 

When it try to get the font sizefor any letter it always returns 1.0, using
this code:

public class PDFTextStripperExtender extends PDFTextStripper {

@Override

             public void processTextPosition( TextPosition text )  {

                        System.out.println( "- " + text + ": Font Size: " +
text.getFontSize(); 

            }

}

 

I've also tried "text.getFontSizeInPt()". It returns better values, but
they're not right when compared to Adobe Acrobat font size values.

 

What's the reason for that? And can I get the real size of fonts for each
letter somehow?

 

Best regards,

Hesham 

 



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message