lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, Oct 27, 2009 at 9:17 PM, Stefan <> wrote:
>> Looking at the code in FPDF, it seems to be easy to convert to pure Lua,
>> but of course I know no PHP. If anyone knows PHP and can confirm that it'd
>> be easy to convert to pure Lua, I could try it.
> The PDF dialect that FPDF creates appears to be a slightly older one, which
> is basically a red-headed stepchild of Postscript. This means that it is
> just a fancy text template/generation engine. It shouldn't be TOO hard to
> port it over... (famous last words)

I just skimmed the code through. It's very procedural in style, which
probably makes it relatively simple to understand and port, even if
it's ugly as heck. The library depends on the zlib extension for
compression, and on gdlib for converting gif images into png, and for
finding the dimensions of image files. You'll need replacements for
both of those. Otherwise it looks like something that could be done in
a weekend.

If you give it a try, you're welcome to ask me for help. I know php pretty well.