print with a font not installed in the system

Hi everyone:

Is there any way to print with a font that is not installed in the system, is only in the printer driver.
For example:
If i open a wordpad and after set the printer in the page settings, i'm able to choose some fonts that are not installed.

But when i try to print with these fonts in my program the fonts are not found and the Microsoft Sans Serif font is selected by default.

My code looks like this:

System.Drawing.Font printFontNormal;
     printFontNormal = new System.Drawing.Font
         ("FontB11", 9, System.Drawing.FontStyle.Regular);
The "FontB11" is not found.

Thanks in advance


LVL 4
aponcealbuerneAsked:
Who is Participating?
 
athapaCEO / CTOCommented:
Try using the Win32 API calls to send the your data and escape sequence directly to the printer.

This article takes about how to use some of the printer related native calls and has a small wrapper class.
http://support.microsoft.com/Default.aspx?kbid=322091

0
 
athapaCEO / CTOCommented:
If the font is missing in the system then you could install it with your setup package or while executing your application. So, may be you should validate if the required font is available when your application starts.

AT
0
 
aponcealbuerneAuthor Commented:
I don't have the fonts, they are bult in in the printer or in the driver printer...
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
athapaCEO / CTOCommented:
Are these PostScript printers?

AT
0
 
aponcealbuerneAuthor Commented:

It's a TM-U220 Receipt Printer from epson a printer for POS.
0
 
athapaCEO / CTOCommented:
Check this post too. Basically it says that you have to use Win32 calls to access device specific features (such as bar code font stored in the printer, etc).
http://www.dotnet247.com/247reference/msgs/18/92299.aspx
0
 
aponcealbuerneAuthor Commented:
ok thanks athapa, I'll check it and let you know
0
 
aponcealbuerneAuthor Commented:
thanks athapa it works just FINE !!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.