Printing a RTF file saved as a custom properties of a stack

Charles Szasz cszasz at
Wed Apr 23 18:00:04 EDT 2014


I created a Rtf document using TextEdit and save it as a Rtf.  Then I successfully created a custom property and programmatically store the Rft as a custom property.  I then set up a field "import" in a new substack of my program. I then try the following script:

set the itemdelimiter to "/"
   put the uRtFile of stack “myProgram" into tRTFdata --> 7-1-11 Changed uRtFile from card index to stack!!
   open printing with dialog
   if the result = "cancel" then exit to top
   set the invisible of stack "printStack2" to true
   go to card "printCard" of stack "printStack2"
   set the RTFText of field "input" of card "printCard" of stack "printStack2" to the clipboardData["rtf"]
   put tRTFdata into field "input" of card "printCard" of stack "printStack2"
   print card "printCard" of stack "printStack2"
   close printing

In the print preview on my Mac, I can see the Rtf “coding” and not the nicely formatted text document I wanted.

Charles Szasz
cszasz at

More information about the Use-livecode mailing list