Printing from Ruby

Long story short: I wanted to make pretty-printed stuff. I have, after
several hours, gotten something that can produce acceptable output by
rendering as HTML, which I then run through Firefox -- with five mostly
undocumented about:config changes and an elaborate printing procedure.

That sucks.

I am looking for the ability to do things that are frankly not much beyond
trivial HTML type layout -- a little CSS, but nothing past font sizes and
colors and the like. What are good choices for PDF or postscript rendering
from Ruby, if any? It might be nice to have visibility into rendering at
the level of "if I render this block of text, how tall does it come out?"

I don't need any graphics past maybe the ability to draw solid-colored boxes
behind text.

-s

···

--
Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!

Sounds like a job for prawn: http://prawn.majesticseacreature.com/

We used it for something very similar, and it was superb.

dwh

Seebs wrote:

···

Long story short: I wanted to make pretty-printed stuff. I have, after
several hours, gotten something that can produce acceptable output by
rendering as HTML, which I then run through Firefox -- with five mostly
undocumented about:config changes and an elaborate printing procedure.

That sucks.

I am looking for the ability to do things that are frankly not much beyond
trivial HTML type layout -- a little CSS, but nothing past font sizes and
colors and the like. What are good choices for PDF or postscript rendering
from Ruby, if any? It might be nice to have visibility into rendering at
the level of "if I render this block of text, how tall does it come out?"

I don't need any graphics past maybe the ability to draw solid-colored boxes
behind text.

-s

Maybe prince?

Blog: http://random8.zenunit.com/
Twitter: http://twitter.com/random8r
Learn: http://sensei.zenunit.com/
New video up now at http://sensei.zenunit.com/ real fastcgi rails deploy process! Check it out now!

···

On 24/11/2009, at 11:35 AM, Seebs <usenet-nospam@seebs.net> wrote:

Long story short: I wanted to make pretty-printed stuff. I have, after
several hours, gotten something that can produce acceptable output by
rendering as HTML, which I then run through Firefox -- with five mostly
undocumented about:config changes and an elaborate printing procedure.

That sucks.

I am looking for the ability to do things that are frankly not much beyond
trivial HTML type layout -- a little CSS, but nothing past font sizes and
colors and the like. What are good choices for PDF or postscript rendering
from Ruby, if any? It might be nice to have visibility into rendering at
the level of "if I render this block of text, how tall does it come out?"

I don't need any graphics past maybe the ability to draw solid-colored boxes
behind text.

-s
--
Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
| Seebs.Net <-- lawsuits, religion, and funny pictures
Fair game (Scientology) - Wikipedia <-- get educated!

Thanks! This conveniently aligns with what I'd concluded; looks like
PDF::Writer isn't updated for 1.9, and Prawn looks nice.

Although it worries me a bit that I get a ton of warnings running it under
1.9. But they look harmless.

-s

···

On 2009-11-24, Denis Haskin <denis@haskinferguson.net> wrote:

Sounds like a job for prawn: http://prawn.majesticseacreature.com/

We used it for something very similar, and it was superb.

--
Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
| Seebs.Net <-- lawsuits, religion, and funny pictures
Fair game (Scientology) - Wikipedia <-- get educated!