more on modules
Mar. 6th, 2003 05:18 pmOK, after further poking at the problem, here's what I need:
-- data is coming from a DB, is of variable length, and will contain images of varying size
-- output should a single file (not a tarball/zip of html + images)
-- the resulting file should be easily printable from the typical in-school computer
-- either the generating program needs to insert page breaks in reasonable places or the result needs to be editable with common software. So I need to either group bits of content such that there won't be a pagebreak in the middle unless the clump is more than a page, or I need to be able to tell how full the page is
-- preferably a module that will work with Perl 5.005_03
Here's what I've looked at so far:
PDF: pagination is difficult, if not impossible, and PDF::API2 requires 5.6, though some of the other PDF modules may work, if the pagination thing can be resolved.
Word: can't find a module to write Word. Word will handle HTML, but images remain separate files when done that way.
RTF: doesn't handle image
HTML: images are separate files.
Other formats? Modules to investigate?
-- data is coming from a DB, is of variable length, and will contain images of varying size
-- output should a single file (not a tarball/zip of html + images)
-- the resulting file should be easily printable from the typical in-school computer
-- either the generating program needs to insert page breaks in reasonable places or the result needs to be editable with common software. So I need to either group bits of content such that there won't be a pagebreak in the middle unless the clump is more than a page, or I need to be able to tell how full the page is
-- preferably a module that will work with Perl 5.005_03
Here's what I've looked at so far:
PDF: pagination is difficult, if not impossible, and PDF::API2 requires 5.6, though some of the other PDF modules may work, if the pagination thing can be resolved.
Word: can't find a module to write Word. Word will handle HTML, but images remain separate files when done that way.
RTF: doesn't handle image
HTML: images are separate files.
Other formats? Modules to investigate?
good luck...
Date: 2003-03-06 09:28 pm (UTC)Perhaps you could output to HTML and then convert that to PostScript (or PDF)? Of course web browsers have support for this built-in, but I'm sure there are stand-alone programs (http://www.tdb.uu.se/~jan/html2ps.html) out there too. Also you can group content together with tables; it isn't perfect, but then, I don't know any good ways to insert page breaks directly into HTML. (if only the old "page break" character still worked for that...)
Alternatively, there's always LaTeX and whatnot as another way to format documents and eventually make them into PDFs, but I never
wastedspent enough time on that to get the hang of it...Re: good luck...
Date: 2003-03-07 11:13 am (UTC)The two problems with HTML are the lack of control over page breaks (surmountable; having the user add them in their word processor is an option, though not the ideal) and the inability to embed images into the file -- links to external files are not OK. We want a single file for them to download.
Re: good luck...
Date: 2003-03-13 01:53 am (UTC)http://search.cpan.org/search?query=postscript&mode=all
PostScript is just a markup language like HTML, albeit even more obscure. Tweaking PostScript for pagination or formatting is fairly simple with some PostScript references. I worked for a printing company and spent eight months working with raw PostScript. It takes some getting used to, but it's doable. It's then pretty portable and printable, as well.
Re: good luck...
Date: 2003-03-14 02:34 pm (UTC)