title: set default name to PDF document with itextsharp
body: <p>i am sending a PDF to my page and i want to set a default name when the user tries to save the PDF document.</p>
  
  <p>i am using ItextSharp and VB.Net</p>
  
  <pre><code>Using s As MemoryStream = New MemoryStream()
    Dim Pdf_Writer As PdfWriter = PdfWriter.GetInstance(DocumentPDF, s)
    DocumentPDF.Open()
  
    DocumentPDF.SetMargins(10.0F, 10.0F, 10.0F, 10.0F)
  
    DocumentPDF.Add(Table)
  
    DocumentPDF.Close()
  
    contentX= s.ToArray()
    HttpContext.Current.Response.Buffer = False
    HttpContext.Current.Response.Clear()
    HttpContext.Current.Response.ClearContent()
    HttpContext.Current.Response.ClearHeaders()
    HttpContext.Current.Response.ContentType = "Application/pdf"
    HttpContext.Current.Response.BinaryWrite(contentX)
    HttpContext.Current.Response.Flush()
    HttpContext.Current.Response.End()
  End Using
  </code></pre>
  
  <p>.</p>
  
  <pre><code>Response.AddHeader("content-disposition", @"attachment;filename=""MyFile.pdf""");
  </code></pre>
  
  <p>this way download the file(yea, it sets a default name), but i just want to show the file and if the user wants to save it, well... save it(with a default name)</p>
  
  <p>how can i set a default name to my PDF document?</p>