RTFtext, printing and tabStops

Jan Schenkel janschenkel at yahoo.com
Fri Aug 22 07:48:25 EDT 2008

--- Shari Coxford <scoxford at hermansilvercpas.com>
> Figured out the wonkiness.  It was related to
> tabStops.  They apparently are not pulled in
> automatically with the RTF file so I did this:
> Looked at the original RTF file and got the tabStops
> in inches.  Converted them to pixels (72 pixels per
> inch).  Then just before printing, set the tabStops
> of the fld to my calculated stops.  So tabs at .5
> inches, 1 inch and 5 inches would be:
> Set the tabStops of someField to 36,72,360
> (no quotes)
> Now we're cooking!
> Shari 

Hi Shari,

Now that you've figured out most of the answers to
your problems, the following comes to mind:
- Revolution's rtfText supports only a subset of the
RTF specification (to be more precise, it takes what
it can provide with its own field rendering system and
tries to kindly morph the rest into it)
- Maybe it's better to use Word as your printing
vehicle: let the user save a Word file as an RTF file,
use that as a template for 'merging' the actual data
into it, and then open the resulting output with Word,
and send it to the printer
- Presumably you're using Revolution to 'preview' the
letter before printing, and at that point you might as
well automatically open the file in Word and let the
user tweak things if they want to, and hit the 'print'
button in Word.

If I find the time to do a follow-up article for the
RevUp Newsletter, I'll write up how to automate Word
for this sort of thing. Merge is also fun when applied
to AppleScript, VBScript and the like :-)

Jan Schenkel.

Quartam Reports & PDF Library for Revolution

"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


More information about the use-livecode mailing list