GetPageTextWithCoords font size

Discussions about PDF management.
Post Reply
dsops
Posts: 2
Joined: Fri Jul 11, 2014 1:10 pm

GetPageTextWithCoords font size

Post by dsops » Fri Jul 11, 2014 1:16 pm

How the font size information should be interpreted? I'm getting 4-digits values, like 1199, 1166, ...

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: GetPageTextWithCoords font size

Post by SamiKharma » Thu Jul 17, 2014 6:07 pm

Hi,

From the documentation of the function: Returned coordinates are given in points = 1/72 inches.

Best regards,
Sami Kharma
GdPicture Support

Vincent
Posts: 3
Joined: Fri Jul 18, 2014 1:47 am

Re: GetPageTextWithCoords font size

Post by Vincent » Fri Jul 18, 2014 1:59 am

Hi Sami,

You may have misread the question. We are asking about font size, not coordinates.

GetPageTextWithCoords is saying my font size is 5062. If you do the math 5062 * 1/72 = 70.3 70 inches tall for normal reading text looks wrong to me. Can you please explain in more details how to convert this number to a regular font size used in Ms Word for example?

Many thanks,
Vincent

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: GetPageTextWithCoords font size

Post by SamiKharma » Sun Jul 20, 2014 12:09 pm

Hi Vincent,

I am pasting the answer you got on the support platform here so other users can make use of it.

This is a very complex notion as it involves fonts and typographic concepts. Basically the returned font size is not what you may think it is because the name is quite misleading (and I agree, this should be documented, and it will).
The value that is returned is expressed in the glyph coordinate system, specifying the height of the font bounding box. The font bounding box being the smallest rectangle enclosing the shape that would result if all the glyphs of the font were placed with their origins coinciding and then filled.
So in other words, it has nothing to do with the actual font size and that's why we renamed it in the documentation as "Font box height".

Best,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests