Printer specific fonts . How to access in Java?

M

Mike Grace

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top