Yazıyı Pdf’ye Aktar — Csharp

Yazıyı Pdf’ye Aktar — Csharp

 

Not: Pdf yi C anadizini içine gorsel.pdf olarak oluşturuyor.

 

pdf_aktar2

[code lang=”csharp”]

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using iTextSharp.text.pdf;
using iTextSharp.text;
using System.IO;
namespace pdf_aktar
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void btnPdfAktar_Click(object sender, EventArgs e)
{
iTextSharp.text.Document document = new iTextSharp.text.Document();
PdfWriter.GetInstance(document, new FileStream(@"C:\gorsel.pdf", FileMode.Create));
if (document.IsOpen() == false)
{
document.Open();
string text = "www.gorselprogramlama.com \n www.gorselprogramlama.com "; ;
document.Add(new Paragraph(text));
document.Close();
}
}//www.gorselprogramlama.com
}
}

[/code]

pdf_aktar3

pdf_aktar

Projeyi İNDİR

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir