This is something i have used earlier. Your scenario could be different, but PDFDocument usage will be same.
using System;
using System.IO;
using iTextSharp.text.pdf;
namespace TestApplication
{
public partial class dialog : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
PdfPTable SummaryTable = new PdfPTable(2);
using (FileStream fs = new FileStream(Server.MapPath("YourRelativeFilePath"), FileMode.Create))
{
using (iTextSharp.text.Document doc = new iTextSharp.text.Document())
{
PdfWriter writer = PdfWriter.GetInstance(doc, fs);
doc.Open();
doc.Add(SummaryTable);
doc.Close();
}
fs.Close();
}
}
}
}
Sample usage of 'YourRelativeFilePath':
FileStream fs = new FileStream(Server.MapPath("~\\MailUploads\\SearchReport\\" + sFileName), FileMode.Create)
MailUploads is a folder inside my project and inside it there is a subfolder SearchReport, sFileName is the string variable which holds the name with which the pdf should be saved.
hope this helps.