Merhaba form üzerinde listview tablosuna kayıtlara çift tıklayarak masaüstüne pdf şeklinde belgeyi atmasını sağlıyorum fakat türkçe karakter sorunu çıkıyor Arial Unicode Ms Fontunu internetten indirip C sürücüsü font klasörüne yükledim fakat yine aynı yapay zekadanda yararlandım fakat düzeltemedim acaba yazı fontunu değiştirsek düzelebilir mi .?
`private void CreatePdf(string stokKodu,string kayıttarihi,string stokadı)
{
string pdfPath = @"C:\Users\IT\Desktop\dosya.pdf";
using (Document doc = new Document())
{
try
{
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(pdfPath, FileMode.Create));
doc.Open();
// Başlık
string baslik = "STOK KART BİLGİLERİ";
iTextSharp.text.Font baslikFont = iTextSharp.text.FontFactory.GetFont("Arial Unicode MS", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED, 10, iTextSharp.text.Font.BOLD, iTextSharp.text.BaseColor.BLACK);
PdfContentByte cb = writer.DirectContent;
ColumnText.ShowTextAligned(cb, Element.ALIGN_CENTER, new Phrase(baslik, baslikFont), doc.PageSize.Width / 2, doc.PageSize.Height - 30, 0);
// STOK KODU
//iTextSharp.text.Font baslikFont = iTextSharp.text.FontFactory.GetFont(iTextSharp.text.FontFactory.HELVETICA_BOLD, 8, iTextSharp.text.BaseColor.BLACK);
iTextSharp.text.Font degerFont = iTextSharp.text.FontFactory.GetFont(iTextSharp.text.FontFactory.HELVETICA, 8, iTextSharp.text.BaseColor.BLACK);
// Boşluk ekleyelim
doc.Add(new Paragraph(" "));
Paragraph pStokKodu = new Paragraph();
pStokKodu.Add(new Phrase("STOK KODU: ", baslikFont));
pStokKodu.Add(new Phrase(stokKodu, degerFont));
doc.Add(pStokKodu);
Paragraph pKayıtTarihi = new Paragraph();
pKayıtTarihi.Add(new Phrase("KAYIT TARİHİ: ", baslikFont));
pKayıtTarihi.Add(new Phrase(kayıttarihi, degerFont));
doc.Add(pKayıtTarihi);
Paragraph pStokadı = new Paragraph();
pStokadı.Add(new Phrase("STOK ADI: ", baslikFont));
pStokadı.Add(new Phrase(stokadı, degerFont));
doc.Add(pStokadı);
MessageBox.Show("PDF başarıyla oluşturuldu!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
MessageBox.Show("PDF oluşturma hatası: " + ex.Message, "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
doc.Close();
}
}
}`