PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 30, 2024 3:29 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Jan 15, 2011 4:51 pm 
Offline

Joined: Thu May 28, 2009 8:11 pm
Posts: 14
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.ashx
For 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!!!!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group