Solved

print with a font not installed in the system

Posted on 2006-07-11
8
1,638 Views
Last Modified: 2013-12-03
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


0
Comment
Question by:aponcealbuerne
  • 4
  • 4
8 Comments
 
LVL 10

Expert Comment

by:athapa
Comment Utility
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
 
LVL 4

Author Comment

by:aponcealbuerne
Comment Utility
I don't have the fonts, they are bult in in the printer or in the driver printer...
0
 
LVL 10

Expert Comment

by:athapa
Comment Utility
Are these PostScript printers?

AT
0
 
LVL 4

Author Comment

by:aponcealbuerne
Comment Utility

It's a TM-U220 Receipt Printer from epson a printer for POS.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 10

Accepted Solution

by:
athapa earned 500 total points
Comment Utility
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
 
LVL 10

Expert Comment

by:athapa
Comment Utility
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
 
LVL 4

Author Comment

by:aponcealbuerne
Comment Utility
ok thanks athapa, I'll check it and let you know
0
 
LVL 4

Author Comment

by:aponcealbuerne
Comment Utility
thanks athapa it works just FINE !!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Ivo
Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now