Hi,
With the help of ElementReaderAdvTest sample, I am able to read path of a line for the attached PDF file.
I have applied page default matrix and CTM on the path points. I have used those path points and create a line in another format. But, length of the line differs. Please suggest me how to get the same line length on the conversion.
Here is the pseudo code for applying transformation.
Matrix2D defaultMatrix = pageIterator.Current().GetDefaultMatrix();
// Process path and apply transformation
Matrix2D ctm = path.GetCTM();
Matrix2D resultant = defaultMatrix * ctm;
// Process Path Data Points
List listPoints = new List();
switch ((PathData.PathSegmentType) ((int) opr[opr_itr]))
{
case PathData.PathSegmentType.e_moveto:
x1 = data[data_itr]; ++data_itr;
y1 = data[data_itr]; ++data_itr;
resultant.Mult(ref x1, ref y1);
listPoints.Add(new Point(x1, y1));
break;
case PathData.PathSegmentType.e_lineto:
x1 = data[data_itr]; ++data_itr;
y1 = data[data_itr]; ++data_itr;
resultant.Mult(ref x1, ref y1);
listPoints.Add(new Point(x1, y1));
break;
}
With the use of listPoints, I have created lines in another format. But, the line is not same length as in PDF. Please suggest me how to apply transformation to get proper value.
Note: I already posted a question. But I don’t see the question in the list. So, I am posting it again. Sorry for repetition if you already received the same question.
Thanks,
Senthilkumar C K
PdfLineTest.pdf (2.02 KB)