nolly: (Default)
[personal profile] nolly
OK, 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?

good luck...

Date: 2003-03-06 09:28 pm (UTC)
From: [identity profile] pbaylies.livejournal.com
If you find a good solution to this one, let the rest of us know, especially as concerns the sane page breaks... that's one of my pet peeves.

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 wasted spent enough time on that to get the hang of it...

Re: good luck...

Date: 2003-03-07 11:13 am (UTC)
From: [identity profile] nolly.livejournal.com
That last is pretty close to what [livejournal.com profile] jackbishop suggested last night, initially in jest, but it's actually got potential.

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)
From: [identity profile] voider.livejournal.com
You could always just generate PostScript straight from the program. There are a bunch of PostScript related modules on CPAN:

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)
From: [identity profile] nolly.livejournal.com
We'd still have to convert to PDF, I think, but I'll have to look into that. (The output must be printable by a typical school administrator or teacher.) And I know PS -> PDF converters are out there.

Profile

nolly: (Default)
nolly

December 2011

S M T W T F S
     123
45678910
11121314 151617
18192021 222324
25262728293031

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 24th, 2026 10:35 pm
Powered by Dreamwidth Studios