Advertisement
hiroyukims

iTextSharp

May 26th, 2014
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1.  private void button13_Click_1(object sender, EventArgs e)
  2.         {
  3.             GeraRelatorio(@"C:\Users\Hiroyuki\Desktop\ArquivoPDF");
  4.  
  5.         }
  6.  
  7.         private void GeraRelatorio(string CaminhoDoArquivo) {
  8.  
  9.             Document documento = new Document();
  10.             PdfWriter.GetInstance(documento, new FileStream(CaminhoDoArquivo, FileMode.Create));
  11.  
  12.             try
  13.             {
  14.                 Paragraph p = new Paragraph(//////);
  15.                 documento.Open();
  16.                 documento.Add(p);
  17.                 documento.Close();
  18.  
  19.             }
  20.             catch (Exception e) {
  21.                 MessageBox.Show(e.StackTrace);
  22.             }
  23.  
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement