Re: how to print data with a table-like layout in txt file
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Friday, September 19, 2008, 5:19:15 AM, HawkCoretech wrote: > Hi, > thanks for your reply. > So, is Freemarker designed primary for Web template engine or for general > purpose? > Because I have a requirement to generate arbitrary text layout like table, > comma-separation file. > Is it suitable to use Freemarker to do this? > I have surveyed most of template engine, they seems to design for web > template engine, do someone know any general purpose template engine? FreeMarker *is* a general purpose template engine and that's exactly the problem; for generating nicely formatted plain text ideally you use a template engine that's specialized on plain text (but I don't know about a such template engine). Now maybe you can still done what you *actually* need with a few FreeMarker macros, with some luck even elegantly. And surely you can generate comma-separated-text file with FreeMarker, and source code that compiles fine, things like that, those used to be easy. Nicely formatted plain text can be tricky because that's already a kind of rendering task, a thing that involves page-setting things (note that markup languages like HTML don't; it's the browser that renders the HTLM). -- Best regards, Daniel Dekany ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/