Printer Fonts

rustyd

Well-known member
Joined
Mar 5, 2003
Messages
112
In VB6 you could access the printer fonts with Printer.FontCount and Printer.Fonts().

Is their a similar functionality in .NET? If so, where can I find it?

Specifically Im trying to print to a Dot Matrix printer. The dot matrix printer fonts do not get listed when the fonts are enumerated into a listbox. Now Im trying to select the font through code by selecting the dot matrix printer and then setting the font.

Ive tried:
Code:
    dlg.Document = pd
    Dim result As DialogResult = dlg.ShowDialog()
    printFont = New Font("Draft10cpi", 10)

and
Code:
    dlg.Document = pd
    Dim result As DialogResult = dlg.ShowDialog()
    printFont = New Font("Draft 10cpi", 10)

but when I did:
Code:
Console.WriteLine(printFont.ToString)
Both returned San Serif.
 
Last edited by a moderator:
Thanks, Divil.

Can I set the font to "Draft 10cpi" using API calls to print to a dot matrix printer?
 
Back
Top