Questions tagged [rtf]

The Rich Text Format (often abbreviated RTF) is a proprietary document file format with published specification developed by Microsoft Corporation since 1987 for Microsoft products and for cross-platform document interchange.

Most word processors are able to read and write some versions of RTF. There are several different revisions of RTF specification and portability of files will depend on what version of RTF is being used. RTF specifications are changed and published with major Microsoft Word/Microsoft Office versions.

It should not be confused with enriched text (mimetype "text/enriched" of RFC 1896) or its predecessor Rich Text (mimetype "text/richtext" of RFC 1341 and 1521); nor with IBM's RFT-DCA (Revisable Format Text-Document Content Architecture) which are completely different specifications.

http://en.wikipedia.org/wiki/Rich_Text_Format

1809 questions
11
votes
4 answers

How to create RTF from plain text (or string) in C#?

Could anyone please help me to create RTF from string in C#? I save all the formats (bold, italic, etc) in a customized class. Jerry
Jerry
  • 1,018
  • 4
  • 13
  • 22
10
votes
3 answers

How to convert FlowDocument to rtf

I have used a WPF RichTextBox to save a flowdocument from it as byte[] in database. Now i need to retrieve this data and display in a report RichTextBox as an rtf. when i try to convert the byte[] using TextRange or in XAMLReader i get a…
Arvind
10
votes
2 answers

Convert RTF to and from plain text

I have a requirement to convert plain text to and from RTF (RichText Format) using javascript. I am looking for a function for each conversion, and I am not looking to use a library. Conversion from plain to RTF The formatting styles and colours are…
musefan
  • 47,875
  • 21
  • 135
  • 185
10
votes
4 answers

Cleaning up RTF text

I'd like to take some RTF input and clean it to remove all RTF formatting except \ul \b \i to paste it into Word with minor format information. The command used to paste into Word will be something…
Vincent
  • 22,366
  • 18
  • 58
  • 61
10
votes
2 answers

Why isn't the richtextbox displaying this table properly?

Apparently, the RichTextBox provided by Microsoft doesn't fully support the RTF specs. For some reason, it won't permit multi-lined rows, and destroys formatting instead. Forexample, here is the RTF code to generate a…
Malfist
  • 31,179
  • 61
  • 182
  • 269
10
votes
2 answers

Is there a way in PHP to access compressed RTF and output RTF code

Is there a way in PHP to access compressed RTF and ouput RTF code to the browser? I have a text column in SQL and I would like to extract the RTF from it - I have managed to output the data as 0x1F8B I believe this data is compressed RTF -…
Rob
  • 1,235
  • 2
  • 19
  • 44
9
votes
6 answers

Save source code with formatting (syntax highlight)

I need to submit my code to a competition in a .pdf file. It would be nice and much easier to read if the syntax was highlighted as in the actual studio. I don't really feel like highlighting it by myself, line after line, so is there a way to…
Martin Melka
  • 7,177
  • 16
  • 79
  • 138
9
votes
3 answers

How can I generate a rich text link for pbcopy

I've been playing with a script that takes the selected text in Chrome and looks it up in Google, offering the four top choices, and then pasting the relevant link. It is pasted in different formats depending on which page is currently open in…
Stian Håklev
  • 1,240
  • 2
  • 14
  • 26
9
votes
4 answers

How to read .rtf file and convert into python3 strings and can be stored in python3 list?

I am having a .rtf file and I want to read the file and store strings into list using python3 by using any package but it should be compatible with both Windows and Linux. I have tried striprtf but read_rtf is not working. from striprtf.striprtf…
RajAt SiNha
  • 97
  • 1
  • 1
  • 8
9
votes
1 answer

Flutter read from and write to rtf file

I discovered Flutter for desktop applications recently. Now I want to make an application that is able to extract RichText from and write it to rtf files. I there any possibility to do that?
Patrick
  • 552
  • 5
  • 17
9
votes
2 answers

Converting .rtf to .txt with Python 3

I have several hundred .rtf files that need to be converted to .txt. I have tried reading and writing the contents of the files into a new text file, but this seems rather tedious. Is there an easier way to do this with python 3? The data in the…
m4148
  • 91
  • 1
  • 1
  • 3
9
votes
5 answers

How do I generate RTF from Java?

I work on a web-based tool where we offer customized prints. Currently we build an XML structure with Java, feed it to the XMLmind XSL-FO Converter along with customized XSL-FO, which then produces an RTF document. This works fine on simple layouts,…
Ingvald
  • 443
  • 1
  • 4
  • 12
9
votes
2 answers

Loading RTF text from database into TRichEdit

I am currently in the process of migrating our software solution from Delphi 7 to 2010. Mostly the changes have been simple and there are only a small amount of hurdles left to go. On a form we use a TRichEdit which displayed rtf text grabbed from a…
Simon Hartcher
  • 3,400
  • 3
  • 30
  • 34
9
votes
2 answers

Converting rtf to pdf using python

I am new to the python language and I am given a task to convert rtf to pdf using python. I googled and found some code- (not exactly rtf to pdf) but I tried working on it and changed it according to my requirement. But I am not able to solve it. I…
ani
  • 191
  • 1
  • 3
  • 12
9
votes
3 answers

Unicode RTF text in RichEdit

I'm having trouble getting a RichEdit control to display unicode RTF text. My application is Unicode, so all strings are wchar_t strings. If I create the control as "RichEdit20A" I can use e.g. SetWindowText, and the text is displayed with the…
NPVN