title: Saving PDF to Local Disk C#
body: <p>I am trying to save a PDF to the document folder. I have googled and came across a lot of resources but none of them worked for me. I have tried using showfiledialog which did not work. What I want is to save my PDF file to the documents folder. I need this done for a school project and this is the only part that has stumped me.  So far this is my code:</p>
  
  <pre><code>  private void savePDF_Click(object sender, EventArgs e)
  {
      FileStream fileStream = new FileStream(nameTxtB.Text + "Repair.pdf", FileMode.Create, FileAccess.Write, FileShare.None);
  
      Document document = new Document(); 
      PdfWriter pdfWriter = PdfWriter.GetInstance(document, fileStream);             
      pdfWriter.Open(); 
      PdfContentByte cb = pdfWriter.DirectContent;
      ColumnText ct = new ColumnText(cb);
      document.Open(); 
      ...
  </code></pre>