Pdf’ye tablo içine yatay ve dikey yazı ekle – Csharp

Pdf’ye tablo içine yatay ve dikey yazı ekle – Csharp

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


yatay2

 

 

[code lang=”csharp”]

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;//www.gorselprogramlama.com
using System.Windows.Forms;
using iTextSharp.text.pdf;
using iTextSharp.text;
using System.IO;
using System.Data.OleDb;
using System.Drawing.Text;
namespace pdf_aktar
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//www.gorselprogramlama.com
iTextSharp.text.Document document = new iTextSharp.text.Document();
PdfWriter.GetInstance(document, new FileStream(@"C:\gorsel.pdf", FileMode.Create));
if (document.IsOpen() == false)
{
document.Open();
PdfPTable table = new PdfPTable(3);
table.TotalWidth = 144f;
table.LockedWidth = true;
table.HorizontalAlignment = 0;
PdfPCell left = new PdfPCell(new Paragraph("www.gorselprogramlama.com "));
left.Rotation = 90;
table.AddCell(left);
PdfPCell middle = new PdfPCell(new Paragraph("www.gorselprogramlama.com"));
middle.Rotation = -90;
table.AddCell(middle);
table.AddCell("www.gorselprogramlama.co");
document.Add(table);
document.Close();
}
}
}//www.gorselprogramlama.com
}

[/code]

 

yatay2

 

yatay

 

Projeyi İNDİR

Yorumlar 1

Bir yanıt yazın

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