Shishir,

PDF does not store the word co-ordinates in parts for this string. Primary
Diagnosis: elder will be a single entry in the PDF. The information you can
get is string length, width, height etc. So if you know the font point size
you need to calculate the x-co-ordinate of Diagnosis:. but beware. This is
quite tricky when you go for varriable pitch font (Arial, Times new roman
etc.)

~Thanks
Dexter

On Tue, Mar 24, 2009 at 11:42 AM, Shishir Mane-Patil
<[email protected]>wrote:

> Hi,
>
> I wish to find accurately the width of a sub-string using the
> PDFTextStripper. For e.g. part of the output of PDF Text extraction example
> is as follows:
>
>
>
> String[75.0,278.8 fs=10.0 xscale=1.0 height=7.0000005 space=5.830001
> width=108.87001]Primary Diagnosis: elder
>
>
>
> Here the width calculated for the entire string “Primary Diagnosis: elder”
> is 108.87001. I wish to find the starting x-coordinate for just the word
> ‘Diagnosis’ and the width of the same word. How can I find the exact
> x-coordinate and the width of such substrings.
>
>
>
>
>
> Thanks and Regards,
>
> Shishir Mane
>

Reply via email to