vb.net වලින් PDF Export කරන විදිය ගැන කියලා දෙන්න පුලුවන්ද ? මෙ කෝඩ් ඒක ඉංග්රිසි ෆොන්ට් වලට වැඩ සිංහල ෆොන්ට් හරියට වැඩ කරන්නේ නෑ. සිංහල ෆොන්ට් වලින් හරියන ක්රමයක් තියෙනවද ?
bump
------ Post added on Feb 6, 2023 at 12:45 PM
Code:
Imports PdfSharp.Pdf
Imports PdfSharp.Drawing
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim pdfDoc As New PdfDocument()
Dim pdfPage As PdfPage = pdfDoc.AddPage()
Dim gfx As XGraphics = XGraphics.FromPdfPage(pdfPage)
Dim font As New XFont("Noto Sans Sinhala", 12, XFontStyle.Regular)
gfx.DrawString("අද හරි ලස්සන දවසක් ගමට යමි", font, XBrushes.Black, New XRect(0, 0, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormat.Center)
pdfDoc.Save("SinhalaText.pdf")
End Sub
End Class
bump
------ Post added on Feb 6, 2023 at 12:45 PM