[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

If you use PDF::Writer, read this post!

Gregory Brown

1/18/2009 1:38:00 AM

I'm getting very few requests for features to add to Prawn that exist
in PDF::Writer but not in Prawn.
Because it directly effects each and every user, I need to know what
this means. =A0Please remember that I intend to *END ALL SUPPORT FOR
PDF::WRITER* after Prawn becomes PDF::Document, so long as there is a
sufficient mandate from the community.

=3D Are you happy with Prawn as it is and have already migrated your new
projects to it?

If so, you have your right to remain silent. =A0But it'd be re-assuring
to hear from you to know that you're satisfied.

=3D Are there features you need that have not yet been implemented in
Prawn?

Please let me know know ASAP, within the next few weeks or so if
possible. =A0 Other uses should feel welcome to +1 these requests, so I
know how much of a demand there is. =A0If you do this, there is a good
chance you'll see these in Prawn / PDF::Document 1.0

=3D Do you plan to keep on using PDF::Writer even though it's slated for
deprecation?

Don't. =A0We won't even be handling bug fixes after this summer.

Or if there are enough people with this plan, please start talking to
me now. =A0 I'll get in touch with Austin and see what he thinks about
bringing in a new maintainer. =A0But you should have a really good
reason for this. :)

With luck, we'll have a broad adoption of Prawn and there will be
group hugs all around. =A0But I'm trying to make this transition as
smooth as possible by planning ahead, so please help me by stating
your intentions.

-greg

PS: The urgency and intensity of this post is meant to be a bit
humorous, but also to emphasize the point that a change is in the
wind.

18 Answers

Stefan Lang

1/18/2009 2:01:00 AM

0

2009/1/18 Gregory Brown <gregory.t.brown@gmail.com>:
> I'm getting very few requests for features to add to Prawn that exist
> in PDF::Writer but not in Prawn.
> Because it directly effects each and every user, I need to know what
> this means. Please remember that I intend to *END ALL SUPPORT FOR
> PDF::WRITER* after Prawn becomes PDF::Document, so long as there is a
> sufficient mandate from the community.

Why rename it? Prawn is a nice name, while PDF::Document seems to
imply that there are other closely related PDF::* modules.

> = Are you happy with Prawn as it is and have already migrated your new
> projects to it?
>
> If so, you have your right to remain silent. But it'd be re-assuring
> to hear from you to know that you're satisfied.

I've written a prototype with Prawn and it was a pleasurable
experience. Nice API!

> = Are there features you need that have not yet been implemented in
> Prawn?

Being able to put more complex objects than just text into table
cells would be cool, as well as more options for table borders.
(I've used 0.3.0 so maybe this request is already obsolete.)

> Please let me know know ASAP, within the next few weeks or so if
> possible. Other uses should feel welcome to +1 these requests, so I
> know how much of a demand there is. If you do this, there is a good
> chance you'll see these in Prawn / PDF::Document 1.0

> -greg

Stefan

Gregory Brown

1/18/2009 2:13:00 AM

0

On Sat, Jan 17, 2009 at 9:00 PM, Stefan Lang
<perfectly.normal.hacker@gmail.com> wrote:
> 2009/1/18 Gregory Brown <gregory.t.brown@gmail.com>:
>> I'm getting very few requests for features to add to Prawn that exist
>> in PDF::Writer but not in Prawn.
>> Because it directly effects each and every user, I need to know what
>> this means. Please remember that I intend to *END ALL SUPPORT FOR
>> PDF::WRITER* after Prawn becomes PDF::Document, so long as there is a
>> sufficient mandate from the community.
>
> Why rename it? Prawn is a nice name, while PDF::Document seems to
> imply that there are other closely related PDF::* modules.

There are :)

We've got PDF::Inspector and PDF::Reader. Both which are tentatively
planned to become part of the 'pdf' project.

http://rubyforge.org/pr...

gem install pdf would get you all of them.
Note that I'll likely turn Prawn into PDF::Document by something
simple like this in the pdf gem:

module PDF; end
Prawn = PDF;
require "prawn"

Or something silly like that, at first. (Just off the top of my head,
I'm not sure the above actually works)

It may be possible to just keep Prawn as Prawn, but we'll see how it goes.

>> = Are you happy with Prawn as it is and have already migrated your new
>> projects to it?
>>
>> If so, you have your right to remain silent. But it'd be re-assuring
>> to hear from you to know that you're satisfied.
>
> I've written a prototype with Prawn and it was a pleasurable
> experience. Nice API!

Awesome.

>> = Are there features you need that have not yet been implemented in
>> Prawn?
>
> Being able to put more complex objects than just text into table
> cells would be cool, as well as more options for table borders.
> (I've used 0.3.0 so maybe this request is already obsolete.)

The former request is in high demand. I've been hoping for someone
else to nail it because I've suggested on the Prawn list how I'd like
to see it implemented and I feel it's a straightforward patch. So
far, no one has bit. I will implement this if no one does before
1.0, most likely.

The latter, we've got some things that are new, others not advertised.
Before I do more with the table stuff, I need to re-organize it a
bit, but it's coming. I usually ask for folks to file tickets for
stuff like this, but those two issues are burned into my brain well
enough and rest on me getting some stuff done before I can tackle them
anyway, so don't worry about it.

Of course, patches are welcome for both. :)

-greg

--
Technical Blaag at: http://blog.majesticseacr...
Non-tech stuff at: http://metametta.bl...
"Ruby Best Practices" Book now in O'Reilly Roughcuts:
http://rubybestpra...

Trans

1/18/2009 3:13:00 AM

0



On Jan 17, 9:13=A0pm, Gregory Brown <gregory.t.br...@gmail.com> wrote:
> On Sat, Jan 17, 2009 at 9:00 PM, Stefan Lang
>
> <perfectly.normal.hac...@gmail.com> wrote:
> > 2009/1/18 Gregory Brown <gregory.t.br...@gmail.com>:
> >> I'm getting very few requests for features to add to Prawn that exist
> >> in PDF::Writer but not in Prawn.
> >> Because it directly effects each and every user, I need to know what
> >> this means. =A0Please remember that I intend to *END ALL SUPPORT FOR
> >> PDF::WRITER* after Prawn becomes PDF::Document, so long as there is a
> >> sufficient mandate from the community.
>
> > Why rename it? Prawn is a nice name, while PDF::Document seems to
> > imply that there are other closely related PDF::* modules.
>
> There are :)
>
> We've got PDF::Inspector and PDF::Reader. =A0Both which are tentatively
> planned to become part of the 'pdf' project.
>
> http://rubyforge.org/pr...
>
> gem install pdf would get you all of them.
> Note that I'll likely turn Prawn into PDF::Document by something
> simple like this in the pdf gem:
>
> module PDF; end
> Prawn =3D PDF;
> require "prawn"
>
> Or something silly like that, at first. (Just off the top of my head,
> I'm not sure the above actually works)
>
> It may be possible to just keep Prawn as Prawn, but we'll see how it goes=

Gregory Brown

1/18/2009 3:29:00 AM

0

On Sat, Jan 17, 2009 at 10:12 PM, Trans <transfire@gmail.com> wrote:

> module Prawn
> module PDF
> class Document
>
> The extra namespace ensures it can still be used without conflict
> should another lib use the PDF namespace too. And one can do:
>
> include Prawn
>
> to still use just
>
> PDF::Document
>
> A 'shortcut' require can also be provided to automatically do the
> including.

Nah, it'd be mighty annoying to nest all my classes that way. I'm fine
with claiming the PDF namespace since I'm the current maintainer of
the Ruby PDF project (PDF::Writer), and one of the principle
developers on Prawn maintains PDF::Reader.

It will be up to other developers to avoid namespace collisions with
us, or alternatively, join forces and become part of the 'pdf' project
for Ruby.

-greg

--
Technical Blaag at: http://blog.majesticseacr...
Non-tech stuff at: http://metametta.bl...
"Ruby Best Practices" Book now in O'Reilly Roughcuts:
http://rubybestpra...

Redd Vinylene

1/18/2009 10:02:00 AM

0

[Note: parts of this message were removed to make it a legal post.]

Does anybody use this stuff as an alternative to LaTeX?

On Sun, Jan 18, 2009 at 4:28 AM, Gregory Brown <gregory.t.brown@gmail.com>wrote:

> On Sat, Jan 17, 2009 at 10:12 PM, Trans <transfire@gmail.com> wrote:
>
> > module Prawn
> > module PDF
> > class Document
> >
> > The extra namespace ensures it can still be used without conflict
> > should another lib use the PDF namespace too. And one can do:
> >
> > include Prawn
> >
> > to still use just
> >
> > PDF::Document
> >
> > A 'shortcut' require can also be provided to automatically do the
> > including.
>
> Nah, it'd be mighty annoying to nest all my classes that way. I'm fine
> with claiming the PDF namespace since I'm the current maintainer of
> the Ruby PDF project (PDF::Writer), and one of the principle
> developers on Prawn maintains PDF::Reader.
>
> It will be up to other developers to avoid namespace collisions with
> us, or alternatively, join forces and become part of the 'pdf' project
> for Ruby.
>
> -greg
>
> --
> Technical Blaag at: http://blog.majesticseacr...
> Non-tech stuff at: http://metametta.bl...
> "Ruby Best Practices" Book now in O'Reilly Roughcuts:
> http://rubybestpra...
>
>


--
http://www.home.no/re...

Martin DeMello

1/18/2009 12:11:00 PM

0

On Sun, Jan 18, 2009 at 3:32 PM, Redd Vinylene <reddvinylene@gmail.com> wrote:
> Does anybody use this stuff as an alternative to LaTeX?

I have a project that generates lout from ruby and then pdf from lout
- I've been meaning to port it over to prawn and drop the external
dependency. In general, I'd say that if you are machine-generating a
PDF, a ruby library would be a lot more convenient to use than
generating latex or lout or whatever.

martin

Redd Vinylene

1/18/2009 12:55:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

Too true, too true. LaTeX gives me a headache.

On Sun, Jan 18, 2009 at 1:11 PM, Martin DeMello <martindemello@gmail.com>wrote:

> On Sun, Jan 18, 2009 at 3:32 PM, Redd Vinylene <reddvinylene@gmail.com>
> wrote:
> > Does anybody use this stuff as an alternative to LaTeX?
>
> I have a project that generates lout from ruby and then pdf from lout
> - I've been meaning to port it over to prawn and drop the external
> dependency. In general, I'd say that if you are machine-generating a
> PDF, a ruby library would be a lot more convenient to use than
> generating latex or lout or whatever.
>
> martin
>
>


--
http://www.home.no/re...

M. Edward (Ed) Borasky

1/18/2009 4:52:00 PM

0

Redd Vinylene wrote:
> Too true, too true. LaTeX gives me a headache.
>
> On Sun, Jan 18, 2009 at 1:11 PM, Martin DeMello <martindemello@gmail.com>wrote:
>
>> On Sun, Jan 18, 2009 at 3:32 PM, Redd Vinylene <reddvinylene@gmail.com>
>> wrote:
>>> Does anybody use this stuff as an alternative to LaTeX?
>> I have a project that generates lout from ruby and then pdf from lout
>> - I've been meaning to port it over to prawn and drop the external
>> dependency. In general, I'd say that if you are machine-generating a
>> PDF, a ruby library would be a lot more convenient to use than
>> generating latex or lout or whatever.
>>
>> martin
>>
>>
>
>

While we're on the subject of PDFs, LaTeX, etc.

1. I use an open-source document writing tool called LyX
(http://w...) to do nearly all of my documentation. It can
convert to and from almost any format that has an open-source library,
but its "core" is LaTeX and "pdflatex". Its internal format looks a lot
like LaTeX.

The primary scripting language in LyX is Python. Sorry, guys, the snakes
just got there first. :) There is also an excellent package for doing
"literate programming" with LyX in the R programming language at

http://cran.fhcrc.org/contrib/...

I would like to be able to do literate programming with LyX as easily in
Ruby as I can in R or Python.

2. New features for Prawn aka PDF::Document? The PDF format includes the
ability to incorporate multimedia files "seamlessly" into a document.
One extremely impressive example of this is a format called "U3D". This
allows you to incorporate a 3D object in a PDF with very little space
cost, and you can rotate the object, change the lighting on it, etc.
There's a stunning example of the capabilities of this at

http://www.tug.org/texshowcase/L...

And the code to make it is at

http://www.tug.org/texshowcase/Laura...

I'm sure the tools in PDF::Document can easily get a U3D into a PDF, or
if not, could be extended to do so easily. But what I'd really like is a
set of Ruby libraries / classes for making the U3Ds from data! Right
now, it looks like the main open source package for making U3Ds is
Meshlab, which is at

http://meshlab.source...

See also

http://vcg.source...



--
M. Edward (Ed) Borasky

I've never met a happy clam. In fact, most of them were pretty steamed.

Gregory Brown

1/18/2009 5:24:00 PM

0

On Sun, Jan 18, 2009 at 5:02 AM, Redd Vinylene <reddvinylene@gmail.com> wrote:
> Does anybody use this stuff as an alternative to LaTeX?

That's certainly not the goal, but actually Jamis Buck's
prawn-format[0] extension might get people close to some of the
complex needs you'd use LaTeX for. But of course, YMMV.

-greg

[0] http://github.com/jamis/pr...

--
Technical Blaag at: http://blog.majesticseacr...
Non-tech stuff at: http://metametta.bl...
"Ruby Best Practices" Book now in O'Reilly Roughcuts:
http://rubybestpra...

Gregory Brown

1/18/2009 5:53:00 PM

0

On Sun, Jan 18, 2009 at 7:11 AM, Martin DeMello <martindemello@gmail.com> wrote:
> On Sun, Jan 18, 2009 at 3:32 PM, Redd Vinylene <reddvinylene@gmail.com> wrote:
>> Does anybody use this stuff as an alternative to LaTeX?
>
> I have a project that generates lout from ruby and then pdf from lout
> - I've been meaning to port it over to prawn and drop the external
> dependency. In general, I'd say that if you are machine-generating a
> PDF, a ruby library would be a lot more convenient to use than
> generating latex or lout or whatever.

Yes, the benefit of a pure-Ruby to PDF library is that there aren't
intermediate dependencies. Of course, thinks like LaTeX or lout, or
Postscript (via the very cool RGhost library) might have their
benefits in certain situations, and might kick our butts performance
wise.

But when you use Prawn (or PDF::Writer), you've got vanilla Ruby that
generates a complete PDF. The purists among us are sure to find that
appealing.

-greg

--
Technical Blaag at: http://blog.majesticseacr...
Non-tech stuff at: http://metametta.bl...
"Ruby Best Practices" Book now in O'Reilly Roughcuts:
http://rubybestpra...