Printing with specific font-type and font-size

Discussion in 'Java' started by wial, Nov 27, 2008.

  1. wial

    wial Guest

    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
     
    wial, Nov 27, 2008
    #1
    1. Advertising

  2. wial wrote:
    > 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().

    --

    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
     
    Knute Johnson, Nov 27, 2008
    #2
    1. Advertising

  3. wial

    wial Guest

    On Nov 27, 5:49 pm, Knute Johnson <>
    wrote:
    > wial wrote:
    > > 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().
    >
    > --
    >
    > 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
     
    wial, Nov 27, 2008
    #3
    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. Andreas Klemt
    Replies:
    6
    Views:
    11,386
    Peter Theill
    Nov 28, 2004
  2. Michael Glavitsch
    Replies:
    1
    Views:
    795
    Roedy Green
    Jul 15, 2003
  3. dave richards
    Replies:
    2
    Views:
    642
    Paul Furman
    Feb 19, 2004
  4. Wongod
    Replies:
    2
    Views:
    746
  5. mttc
    Replies:
    2
    Views:
    2,459
    Roedy Green
    Jul 3, 2009
Loading...

Share This Page