Printer specific fonts . How to access in Java?

Discussion in 'Java' started by Mike Grace, Aug 26, 2003.

  1. Mike Grace

    Mike Grace Guest

    Hi,

    I am running Java 1.4.2 (latest version) and have a printing problem.

    We run a software package called Unimessage Pro which allows faxes and
    emails to be sent from any windows application and it allows embedded
    commands such as fax number or email address to be put in the document so
    that the software doesn't prompt you for the details.

    To print from word, you set the printer destination to "Unimessage Pro". At
    this point a new font appears in the font list called "Commands". This ONLY
    appears after you have set the specified print destination. It does not
    appear when you have any other printer specified.

    You would then do as follows :-

    [[ TO=01293 786747 ]]

    then just output your printout in any other font.


    When I try and do this in Java i.e. I set the printer destination and then
    create a font as :-

    // Already specified Unimessage Pro as the printer.

    Font cmdfnt = new Font("Commands",Font.PLAIN, 12);

    g2d.setFont(cmdfnt);

    g2d.drawString( "[[TO=01293 786747]]", 100,100);


    The text does not print in the "special commands font" but what ever the
    default font is.

    I am assuming this is because the commands font is not in the windows font
    directory i.e. it is a printer specific font (which may be playing windows
    specific tricks!)

    Is there anyway I can get Java to know about this font i.e. Can I read a
    printer drivers built in fonts or am I screwed?

    Regards


    Mike
     
    Mike Grace, Aug 26, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samuel Lee
    Replies:
    0
    Views:
    560
    Samuel Lee
    Nov 11, 2003
  2. Replies:
    1
    Views:
    387
    Roedy Green
    Oct 26, 2005
  3. sam
    Replies:
    0
    Views:
    445
  4. Replies:
    5
    Views:
    180
  5. Replies:
    3
    Views:
    504
    Arne Vajhøj
    Jan 6, 2013
Loading...

Share This Page