question about pdf/writer

S

shawn bright

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

hey there all,

i am using ruby to make some pdf charts, but there is also a data table i
need to put in there.
i am using pdf/writer and so far so good, but i can't find anywhere that i
can change the color of the table text.
Anyone help me out on this?

thanks
 
A

Austin Ziegler

i am using ruby to make some pdf charts, but there is also a data table i
need to put in there.
i am using pdf/writer and so far so good, but i can't find anywhere that i
can change the color of the table text.
Anyone help me out on this?

You do it by changing the fill color prior to starting the table (IIRC).

-austin
 
N

nephish

You do it by changing the fillcolorprior to starting the table (IIRC).

-austin

Right, thanks Austin, sorry. I did not ask my question very clearly. I
need to be able to make one row of text one color, the next row of
text another color, etc... This i can't find out how to do. All of it
needs to be in the same table.
 
G

Gregory Brown

Right, thanks Austin, sorry. I did not ask my question very clearly. I
need to be able to make one row of text one color, the next row of
text another color, etc... This i can't find out how to do. All of it
needs to be in the same table.

You can get alternating row colors with SimpleTable, but that's about
all.. These are the shade_color and shade_color2 attributes.

If you have more questions about this or other things you encounter in
PDF::Writer, please join our mailing list. I have trouble keeping up
on RubyTalk these days :)

http://rubyforge.org/mailman/listinfo/ruby-pdf-discuss


Also, as an aside, as of ruport-util 0.9, you might get a lot of love
out of Ruport for this kind of thing, if you're willing to poke around
a bit.

-greg
 
G

Gregory Brown

Whoops, I misunderstood. I don't think it will be possible (with the
current implementation) to set text color for individual rows.
Patches welcome though!
 
N

nephish

Whoops, I misunderstood. I don't think it will be possible (with the
current implementation) to set text color for individual rows.
Patches welcome though!

ok, gents, thanks for all your help, will keep poking around. Would
love to help with patches, maybe will some day, but am still a newbie.
Thanks again
sk
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,268
Latest member
AshliMacin

Latest Threads

Top