Hi,
I am trying to draw rectangle over text I am able to draw it using PDFContentEditor.CreatePolyLine but the result has only 3 sides drawn and 4th side is missing.
I have attached image of result and code I am using is as below:
private static void DrawBox(PdfContentEditor editor, int page, TextSegment segment, System.Drawing.Color color)
{
var lineInfo = new LineInfo();
lineInfo.VerticeCoordinate = new[] {
(float)segment.Rectangle.LLX, (float)segment.Rectangle.LLY,
(float)segment.Rectangle.LLX, (float)segment.Rectangle.URY,
(float)segment.Rectangle.URX, (float)segment.Rectangle.URY,
(float)segment.Rectangle.URX, (float)segment.Rectangle.LLY
};
lineInfo.Visibility = true;
lineInfo.LineColor = color;
lineInfo.LineWidth = 1;
editor.CreatePolyLine(lineInfo, page, new System.Drawing.Rectangle(0, 0, 0, 0), null);
}
RectangleSideMissing.JPG (80.2 KB)