The link seems to be broken.
It doesn’t.
Since almost all linux distributions have libre office installed, we can use it to print StyledText on Linux.
Public Sub printRTFwithLibre(source as textarea)
dim sh as new shell
dim cmd as String
dim tmp as FolderItem = SpecialFolder.Temporary.Child("myRTF.rtf")
dim bs as BinaryStream = BinaryStream.Create(tmp, true)
bs.Write(source.StyledText.RTFData)
bs.Close
cmd = "libreoffice --writer -p --headless " + tmp.ShellPath
sh.Execute(cmd)
End Sub
Public Sub showPDFwithLibre(source as textarea)
dim sh as new shell
dim cmd as String
dim tmp as FolderItem = SpecialFolder.Temporary.Child("preview.rtf")
dim bs as BinaryStream = BinaryStream.Create(tmp, true)
bs.Write(source.StyledText.RTFData)
bs.Close
cmd = "cd /tmp;libreoffice --convert-to pdf:writer_pdf_Export --headless " _
+ tmp.ShellPath
sh.Execute(cmd)
if tmp <> nil and tmp.Exists then
dim pdf As FolderItem = SpecialFolder.Temporary.Child("preview.pdf")
if pdf <> nil and pdf.Exists then
ShowURL(pdf.URLPath)
end if
end if
End Sub