Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

  (email not shown publicly)

I work for MessageLabs [] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Monday February 11, 2002
02:31 PM


[ #2786 ]

Today I added a bounding box class to, 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);

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 makes it pretty easy to use, and the results are pretty gorgeous.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Matt, I've always like PDFlib but get confused every time I read the license. I'd be interested in your take of what you can and can't do...
    • 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 (Score:2, Informative)

        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.
        • 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.
  • Today I added a bounding box class to

    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!

    • (Score:2, Interesting)

      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 docume

    • 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).