i have extracted the PDF using itextsharp then converted to html for comparison of two PDF for their stlye. in this i added left and top position for alignment of text. But as soon as i receive superscript the position of text changes. But when i check through firebug the position of left and right position is same as i checked using adobe illustrator. can anyone tel me. Why its happening.In the example i have posted the 7 number should come below "was" but it is away from "was"el away from was.
Vector curBaseline = renderInfo.GetBaseline().GetStartPoint();
Vector topRight = renderInfo.GetAscentLine().GetEndPoint();
y_direction_source = Form1.Pagesize_source +( height_extract_source_page - curBaseline[Vector.I2]);
this.result.AppendFormat("<p style=\"left:{0}pt;top:{1}pt;\">" curBaseline[Vector.I1], y_direction_source);
result:
<p style="font-family:TimesNewRoman;font-size:12.2618001271429pt;font-weight:;font-style:;left:42pt;top:120.2399pt;position:absolute;">
<p style="background: cyan">training</p>
<p style="background: cyan">camps</p>
<pp style="background: cyan">in</p>
<pp style="background: cyan">Afghanistan</p>
<pp style="background: cyan">.</p>
</p>
<pp style="font-family:TimesNewRoman;font-size:10.2386067682737pt;font-weight:;font-style:;left:441.48pt;top:114.72pt;position:absolute;">
<pp style="background: cyan">7</p>
</p>