DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    saintagent Guest

    How can I find printer's font ?


    I have a problem with displaying printer's font. I am using Epson TM-U300
    printer to print receipt. I try to use its font (control font) to control
    the printing. I can't. I can't even use VB.Net to display all printer's font
    in my computer whereas Microsoft Word or VB6 can.

  2. #2
    Phil Weber Guest

    Re: How can I find printer's font ?

    > I have a problem with displaying printer's font. I am using Epson
    > TM-U300 printer to print receipt. I try to use its font (control font)
    > to control the printing. I can't. I can't even use VB.NET to display
    > all printer's font in my computer whereas Microsoft Word or VB6 can.


    Saint: VB.NET (and GDI+, which .NET uses under the hood) only knows about
    TrueType and OpenType fonts. In order to use fonts built into your printer,
    you'll have to use Windows API functions (e.g., OpenPrinter, WritePrinter,
    etc.) to send control codes to the printer.

    The following code will list all the fonts installed on your system:

    Dim f As FontFamily
    Dim fc As New System.Drawing.Text.InstalledFontCollection()
    For Each f In fc.Families
    Debug.WriteLine(f.Name)
    Next

    --
    Phil Weber



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links