Today I added a bounding box class to PDFLib.pm, so now you can say:
my $bb = $pdf->new_bounding_box(x => 30, y => 500, w => 200, h => 800);
$bb->print("Some ");
$bb->set_font(bold => 1);
$bb->print("bold ");
$bb->set_font(italic => 1);
$bb->print("and italic ");
$bb->set_color(rgb => [1,0,1]);
$bb->print("and colourful ");
$bb->set_color(rgb => [0,0,0]);
$bb->set_font(face => "Times", italic => 0, bold => 0);
$bb->print("text.");
$bb->print_line("");
$bb->print_line("");
$bb->print($large_text);
$bb->finish;
And it will basically do what you told it to, all within the bounds of the box you specified. Kinda neat huh?
It's basically a port and extension of the code I wrote for AxPoint, which I may just now convert to use this new stuff, as it's a lot easier for me to use in this abstract way.
I hope more people start to use PDFLib - it's a rather cool library, and seems very fast and efficient, and PDFLib.pm makes it pretty easy to use, and the results are pretty gorgeous.
Re:PDFlib
Matts on 2002-02-12T10:35:09
What do you want to do with it? If you want to distribute commercial software based on pdflib, you have to buy it. Otherwise you can use the free version as much as you like. At least that's my take on it, and I'm pretty sure that's the intention of the license.Re:PDFlib
merijnb on 2002-02-12T15:36:50
We had a discussion with the authors, which
basically led to us removing the software from
our machines. The apparently unlimited server
or unlimited copies deal cannot be mixed in their
eyes. Since we wanted to install it on 31
locations in commercial servers, they wanted
a rather large amount of money.Re:PDFlib
Matts on 2002-02-12T17:44:44
The license covers only instances of use of PDFLib where you're not charging money for something that includes PDFLib, be it a program or a web service. It sounds to me like you're talking about an internal app (albeit on a large scale), and the license explicitly states "to a third party". But I guess I'm no lawyer, and the license does have some bad "smells" to it.
But sure, if you're making money off pdflib, I guess you have to pay.
You're perilously close to making me abandon RTF::Writer in favor of generating PDFs.
Now all you have to do is replace TeX. And I mean that. It will have to be done eventually. Why wait? Evolve now and avoid the rush later!
Re:PDFLib.pm
gtod on 2002-02-12T10:08:43
Why do we have to replace TeX? I ask that out of genuine curiosity. Given that pdftex makes nice PDFs from TeX or LaTeX what are the things you want to do that TeX is weak at?If documents are destined to be read on paper they should probably be PDFs. If they are long technical articles/papers then TeX et al. would seem appropriate. But what about documents with significant amounts of data in them - say your phone bill. How should that be tackled? Or were you thinking about different classes of documents?
Re:PDFLib.pm
Matts on 2002-02-12T11:14:55
TeX is simply weak at producing documents fast. It's a bit slow for interactive use.Re:PDFLib.pm
Matts on 2002-02-12T10:54:01
Well it depends what you want - RTF has some stuff like widow/orphan control that PDF doesn't provide. If it's reports you want to generate though, you might want something as rigid as PDF so everyone's copy is forced to be the same.
What's missing from PDFLib now? Is it just tables? I was thinking of adding those soonish (they're just an extension of the bounding box thing after all).