title: problem in drawing a line in a pdf file using itextsharp
body: <p>I am generating a pdf file in asp.net c# using itextsharp. i am not able to draw a horizontal line/verticle line/dotted line.</p>
  
  <p>i tried to draw a line using the following code,i am getting no errors but the line is also not getting displayed in the pdf file</p>
  
  <pre><code>    PdfContentByte cb = wri.DirectContent;
      cb.SetLineWidth(2.0f);   // Make a bit thicker than 1.0 default
      cb.MoveTo(20, pdfDocument.Top - 40f);
      cb.LineTo(400, pdfDocument.Top - 40f);
      cb.Stroke();
  </code></pre>
  
  <p>What is the problem in the code.Is it because of the position of x y co-ordinates? I had used rough points to know approximate position in pdf,but the line never apears in the pdf file.</p>
  
  <p>The output i am looking out for is as shown in image below.<img src="https://i.stack.imgur.com/pnXap.png" alt="enter image description here"></p>