private void GerarPDF(string pCaminhoArquivoPDF)
{
Document doc = new Document();
// Aqui acontece o erro
PdfWriter.GetInstance(doc, new FileStream(pCaminhoArquivoPDF,FileMode.Create));
try
{
Paragraph p = new Paragraph(textBox1.Text);
doc.Open();
doc.Add(p);
doc.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.StackTrace);
//throw;
}
}
private void OndeGerar(Object o,EventArgs e)
{
GerarPDF( @"C:\Users\CAIO\Desktop\PDF's");
}