I have a print application (in WPF/VB.NET) that uses the following method (boiled down sample) to print:
Dim fd As New FixedDocument()
Dim pc As New PageContent()
Dim fp As New FixedPage()
Dim tb As TextBlock = New TextBlock
tb.Text = "TEST TEXT, ON K PLANE?"
tb.FontFamily = New System.Windows.Media.FontFamily("Arial")
tb.FontStyle = FontStyles.Normal
tb.FontSize = 32
tb.FontWeight = FontWeights.Bold
tb.Foreground = Brushes.Black
'add the text box to the FixedPage
fp.Children.Add(tb)
'add the FixedPage to the PageContent
pc.Child = fp
'add the PageContent to the FixedDocument
fd.Pages.Add(pc)
Dim printDialog As New PrintDialog()
printDialog.PrintDocument(fd.DocumentPaginator, "NB Card Print Job")
The problem is, it does NOT print the text as a TEXT object; it is encapsulated such that the printer doesn't recognize it as text. So, how can I print text such that the printer driver recognizes that text is present?
My Requirements:
-- must have duplex printing
-- must be able to support OpenType font families (as well as TrueType)
-- must be able to print images and vector graphics
-- must have robust text formatting capabilities
In case it helps to know why:
I have a print application that is used to print to a card printer with an overlay ribbon. Simply put, it has a special ribbon for printing certain things, usually text, in carbon black with what they call the K Plane. To get this to work in the typical way, you have to send text objects to the printer.