I want to include a barcode font in my PDF so that the client does not have to have this font installed to have the PDF displayed correctly.
Here's what I have now:
Dim fonttype As String = "Free 3 of 9 Extended"
Dim fontsize As Integer = 40
(..)
row = tbl.AddRow
Dim font As New MigraDoc.DocumentObjectModel.Font
font.Name = fonttype
font.Size = MigraDoc.DocumentObjectModel.Unit.FromPoint(fontsize)
row.Cells(0).Format.Font.ApplyFont(font)
row.Cells(0).AddParagraph("*" + userTicketsDT.Item(0).barcode.ToString + "*")
(..)
Dim docRenderer As MigraDoc.Rendering.DocumentRenderer = New MigraDoc.Rendering.DocumentRenderer(doc)
docRenderer.PrepareDocument()
docRenderer.RenderObject(gfx, XUnit.FromMillimeter(96), XUnit.FromMillimeter(228), "12cm", tbl)
I was given this advice earlier:
---------------------------------------------------------
You specify this when creating a font in PDFsharp:
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always);
http://www.pdfsharp.net/wiki/Unicode-sample.ashxFor MigraDoc:
http://www.pdfsharp.net/wiki/MigraDocHe ... ample.ashx---------------------------------------------------------
But I dont know how to combine that with my existing code...can anyone help me? This is the last step in my project so after this I'm done! Help is really appreciated as such!!!!