[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

question about pdf/writer

shawn bright

11/8/2007 7:02:00 PM

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

5 Answers

Austin Ziegler

11/9/2007 12:01:00 AM

0

On 11/8/07, shawn bright <nephish@gmail.com> wrote:
> 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
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

shawn bright

11/9/2007 3:11:00 PM

0

On Nov 8, 6:00 pm, Austin Ziegler <halosta...@gmail.com> wrote:
> On 11/8/07, shawn bright <neph...@gmail.com> wrote:
>
> > i am using ruby to make somepdfcharts, but there is also a data table i
> > need to put in there.
> > i am usingpdf/writerand so far so good, but i can't find anywhere that i
> > can change thecolorof the table text.
> > Anyone help me out on this?
>
> You do it by changing the fillcolorprior to starting the table (IIRC).
>
> -austin
> --
> Austin Ziegler * halosta...@gmail.com *http://www.halo...
> * aus...@halostatue.ca *http://www.halo...feed/
> * aus...@zieglers.ca

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.


Gregory Brown

11/9/2007 4:07:00 PM

0

On Nov 9, 10:10 am, nephish <neph...@gmail.com> wrote:

> 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-p...


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



Gregory Brown

11/9/2007 4:09:00 PM

0

On Nov 9, 11:07 am, Gregory Brown <gregory.t.br...@gmail.com> wrote:
> On Nov 9, 10:10 am, nephish <neph...@gmail.com> wrote:
>
> > 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.

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!

shawn bright

11/9/2007 4:24:00 PM

0

On Nov 9, 10:08 am, Gregory Brown <gregory.t.br...@gmail.com> wrote:
> On Nov 9, 11:07 am, Gregory Brown <gregory.t.br...@gmail.com> wrote:
>
> > On Nov 9, 10:10 am, nephish <neph...@gmail.com> wrote:
>
> > > 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.
>
> 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