Is it possible to print an .rtf file with livecode?
Many Thanks,
Matthew.
Printing a .rtf (Rich-Text Format) File.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Printing a .rtf (Rich-Text Format) File.
Hi Matthew,
well, printing EXTERNAL files is not directly possible in Livecode!
But you can import that file into a field and then use "revprintfield" or something IN Livecode.
Best
Klaus
well, printing EXTERNAL files is not directly possible in Livecode!

But you can import that file into a field and then use "revprintfield" or something IN Livecode.
Best
Klaus
Re: Printing a .rtf (Rich-Text Format) File.
Matthew,
because Klaus has a "short day" today (what is rather seldom) here a translation of "or something IN Livecode".
You could try the following (example file path).
This "converts" your RTF to HTML and, if you wish, to a printable PDF.
because Klaus has a "short day" today (what is rather seldom) here a translation of "or something IN Livecode".
You could try the following (example file path).
This "converts" your RTF to HTML and, if you wish, to a printable PDF.
Code: Select all
on mouseUp
put "/Users/admin/Documents/Bittelesen.rtf" into myUrl
If there is no fld "rtf2html" then create fld "rtf2html"
-- hide fld "rtf2html"
set rtftext of fld "rtf2html" to url ("file:"&myUrl)
-- stop here if you wish to edit the imported text
wait 10 millisecs with messages
-- revShowPrintDialog true,true -- shows pageSetup and printDialog
revShowPrintDialog false,true -- shows only printDialog
-- in the second dialog you can choose "print to PDF" of your OS # <--
revPrintText the htmltext of fld "rtf2html"
end mouseUp
shiftLock happens