Printing with specific font-type and font-size

W

wial

Hi

I am relatively new to Java, and need to create an applet that will
print a document with a specific font-type and font-size.

I succeeded in printing a document, but I don't know how to correctly
specify the font-type and font-size. I searched on the Internet, but
there are many different ways explained and they all seem a bit
cumbersome to me (last time I did printing was with the Visual Basic
Printer object, which is really straightforward).
The font-type and font-size would be valid for the whole document, I
do not need to change them along the way.

Would someone be able to provide me with some code that I can work
with, or at least point me in the right direction?

Thank you
Willem Alberda
 
K

Knute Johnson

wial said:
Hi

I am relatively new to Java, and need to create an applet that will
print a document with a specific font-type and font-size.

I succeeded in printing a document, but I don't know how to correctly
specify the font-type and font-size. I searched on the Internet, but
there are many different ways explained and they all seem a bit
cumbersome to me (last time I did printing was with the Visual Basic
Printer object, which is really straightforward).
The font-type and font-size would be valid for the whole document, I
do not need to change them along the way.

Would someone be able to provide me with some code that I can work
with, or at least point me in the right direction?

Thank you
Willem Alberda

Printing is exactly like drawing. Just set the font (and its size) with
Graphics.setFont().
 
W

wial

Printing is exactly like drawing.  Just set the font (and its size) with
Graphics.setFont().

--

Knute Johnson
email s/nospam/knute2008/

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
             ------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access- Hide quoted text -

- Show quoted text -

Thank you.

Willem
 

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,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top