Wuestion about iTextSharp : I am coding a program that i need to save texts(from a rich text box) to a pdf. I use iTextSharp and the code that i use is this:

    Document doc = new Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35);
            PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream("TitleOfPdf.pdf", FileMode.Create));//textBox1(in the form) assign here the title of the document
            doc.Open(); //open the document in order to write inside.
            Paragraph paragraph = new Paragraph(richTextBox1.Text);
            // Now adds the above created text using different class object to our pdf document
            doc.Add(paragraph);
            doc.Close();

Now the problem is that i would like the title of the file to be "flexible" and be assigned by the user(from a text box). The problem is that if i change the line:

    PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream("TitleOfPdf.pdf", FileMode.Create));

To:

    PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream(textBox1.Text, FileMode.Create));

Works fine. BUT the file it hasnt extension .pdf It is only a random file. How i can make the title of the document "flexible" so the user can assign it, and the extension will be .pdf ?? Thanks !!