Results 1 to 4 of 4
  1. #1
    sandeep43 is offline Member
    Join Date
    May 2011
    Posts
    97
    Rep Power
    0

    Default How to change font of text?

    Hi,

    i have
    Java Code:
    document.add(new paragraph("NAA Report"));
    the text within double codes i want to make it bold, change font, how can i do it.

    the statement is used to write into .pdf file.

    Please help me out

    Regards
    Sandeep

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    You should say what the class of document is, and what the paragraph class is. (That's a bad name by the way. It would better be called Paragraph.)

    If you are using code from some library or other, say what that is - and consult its documentation!

  3. #3
    sandeep43 is offline Member
    Join Date
    May 2011
    Posts
    97
    Rep Power
    0

    Default

    Hi

    it is not in a class i have declared this, but i have done it in a method i.e. at a click of a button, and since i had to prepare document, i named it has "document", anyways i will change it to an appropriate name, but first please let tell me how to display that text in bold?

    Regards
    Sandeep

  4. #4
    Dark's Avatar
    Dark is offline Senior Member
    Join Date
    Apr 2011
    Location
    Camp Lejuene, North Carolina
    Posts
    643
    Rep Power
    4

    Default

    Quote Originally Posted by pbrockway2 View Post
    You should say what the class of document is, and what the paragraph class is. (That's a bad name by the way. It would better be called Paragraph.)

    If you are using code from some library or other, say what that is - and consult its documentation!
    You didn't do this.
    • Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
    • +Rep people for helpful posts.

Similar Threads

  1. Replies: 0
    Last Post: 08-18-2010, 10:31 AM
  2. Change the Font Size and Text Position
    By stayfierce in forum New To Java
    Replies: 1
    Last Post: 12-03-2009, 05:17 AM
  3. Replies: 5
    Last Post: 04-25-2009, 08:00 PM
  4. How to change The Font
    By kader in forum New To Java
    Replies: 2
    Last Post: 09-15-2008, 04:09 AM
  5. Replies: 0
    Last Post: 06-25-2008, 10:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •