RTF documents as templates

Robert Brenstein rjb at robelko.com
Tue Jun 1 08:38:10 EDT 2010


On 31.05.10 at 10:50 -0700 JosepM apparently wrote:
>Nop. My solution was store the entire document and search and replace before
>to build the document, and then out as PDF using Quartam PDF Library and
>Quartam Reports, but also you can print from a card.
>

If you need to just print, producing PDF files might be a way to go. 
Using RTF works as well. I used RTF documents as templates to produce 
Word docs. Basically, I created a full blown, properly formatted Word 
doc as template, then replaced variable elements with tokens, in my 
case things like [title], [description]. Rev stack read RTF directly 
into a variable and replaced the tokens, then saved new file. One 
needs to use RTF commands for marking new paragraphs, styles, and 
code non-English characters. I even used to produce Word table with 
varying numbers of rows by marking a repeating code for row in RTF 
and replicating it as many times as needed. Some sleuthing required, 
though, to decipher blocks in RTF.

Robert



More information about the use-livecode mailing list