It's probably better for you to read the tutorial or buy the book. There's 
no background text property, that's done by drawing a rectangle in the 
backgroung color and then the text over it. To do that you'll need to know 
the space taken by the text and that will depend on the font and size. This 
is not really trivial.

Paulo

----- Original Message ----- 
From: "Web Service Thesis" <[EMAIL PROTECTED]>
To: "Post all your questions about iText here" 
<[email protected]>
Sent: Monday, June 25, 2007 8:40 PM
Subject: Re: [iText-questions] Changing Background color of selected text


> Paulo,
>
> Thanks for your response.
>
> I was attempting to use the PdfContentByte to directly write data to a 
> pdf.
> That was where I was referring to setColorFill() (it's part of the
> .text.pdf*); Is there a corresponding method that I can use with
> PdfContentByte that would allow me to have the black background on white
> text in a specific location on the PdfDocument? (ie: something like 
> setting
> the background Chunk color)
>
> If I were to use the Chunk class, is there a way for a "textual field" to
> be inserted at a specific location?
>
> Thanks in advance.
>
> Ken
>
>
> On 6/25/07, Paulo Soares <[EMAIL PROTECTED]> wrote:
>>
>> You can set the background Chunk color (and the text color, of course).
>>
>> Paulo
>>
>> ----- Original Message -----
>> From: "Web Service Thesis" <[EMAIL PROTECTED]>
>> To: <[email protected]>
>> Sent: Monday, June 25, 2007 6:30 PM
>> Subject: [iText-questions] Changing Background color of selected text
>>
>>
>> > Hello.
>> >
>> > I am attempting to create a PDF document using iText (Java). I would
>> like
>> > to
>> > make a portion of the text have a black background with white text. 
>> > (The
>> > rest of the document is a standard "white" background with black text.)
>> >
>> > Note, I do not want the entire page to be a black background with white
>> > text, only a small paragraph. (ie: setting the entire document's color
>> > background to one color will not work).
>> >
>> > Is this possible to do? The setColorFill() method can change the color
>> of
>> > the text.
>> >
>> > Thanks in advance for any responses and/or assistance.
>> >
>> > Ken
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> iText-questions mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>> Buy the iText book: http://itext.ugent.be/itext-in-action/
>>
>


--------------------------------------------------------------------------------


> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/


--------------------------------------------------------------------------------


> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to