Resources for programming highly formatted documents?
October 18, 2008 1:51 PM

Is there a solution for producing highly formatted documents programmatically, that is an alternative to ReportLab?

ReportLab is a python library for creating highly formatted PDF documents.

It seems to be one of the only Open Source libraries / programs that can be manipulated programmatically to produce highly formatted documents.

I've already tried the macro interface to OOo and found it lacking (to put it lightly).

Are there other open source, or low cost solutions, that I can use to programmatically create a highly formatted document? Think writing letters, creating resumes, etc; When I say "highly formatted".

In relation to this question.

Thanks for your help.

--Pontifex
posted by Pontifex to Computers & Internet (10 answers total)
Well, the easiest way would probably be a typesetting language, i.e. LaTeX. There are many existing converters from LaTeX to various other formats.
posted by SpecialK at 2:08 PM on October 18, 2008


ditto LaTeX
posted by chrisamiller at 2:41 PM on October 18, 2008


LaTeX is what you want, it shouldn't take long to get going with it and then if you are looking at creating a resume you will want to look online for .cls files made to build resumes. alternatively you can make your own cls but its not as quick a process.
posted by humanawho at 2:48 PM on October 18, 2008


There are a bunch of ruby and/or rails solutions

http://wiki.rubyonrails.org/rails/pages/HowtoGeneratePDFs
posted by zentrification at 3:00 PM on October 18, 2008


All the cool kids use LaTeX (pronounced either as "La tek" or "Lay tek" but not "latex"). That said, it has never been fully taken up by the *design community* so many of the cls files that you'll find (for resumes, reports, or letters) will be pretty, um, simplistic in their design. For example you'll see lots of centering instead of left-aligning, and lots of poor line height stuff going on (though this is controllable to an infinite degree). Doing things like hanging indents, outquotes, and other sexy stuff is definitely possible...
posted by zpousman at 3:23 PM on October 18, 2008


If you don't think the design of the standard LaTeX classes are sophisticated enough, there are more sophisticated replacement classessuch as those in the Memoir and KOMA-script packages.
posted by grouse at 3:37 PM on October 18, 2008


These are a few other ideas. Generating LaTeX has always worked for me, but I'm pretty sure the cool kids use XML these days.

So, you could try directly constructing an OpenDocument XML file instead of using OO's macro interface. Supposedly the OpenDocument schema isn't that complicated.

Or you could try using DocBook as an intermediary format. Though I think DocBook might be unsuitable for anything that's not documentation and/or a book.

Or you could try generating XSL Formatting Objects (XSL-FO), which you can then convert to PDF using Apache FOP. Might be a bit too low level.

Hmm, pod might be what you want. Create a template in OpenOffice, fill it in using Python.
posted by reynaert at 5:01 PM on October 18, 2008


Latex can actually do a lot. You need not stick with the given templates/classes. You can write your own. For examples of what Latex can do, see the TeX Showcase.
posted by bluefly at 5:25 PM on October 18, 2008


pod2latex and then tweaking the resulting latex is pretty good actually.
posted by singingfish at 11:43 PM on October 18, 2008


Wow good stuff.

Excuse my absence of late, other things going on.

Thanks for your input!
posted by Pontifex at 7:16 AM on November 18, 2008


« Older Recommend me some kiddie SF   |   Any good pill dispensers for elderly? Newer »
This thread is closed to new comments.