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
4
votes
3 answers

How do rich text editors work and how would you go about build a basic one?

I thought I knew JavaScript pretty well, but then I thought about how rich text editors work, such as CKeditor, and realized I had no idea. I assume the buttons are somehow hooked up via JavaScript to a text area, but how is it marked up. Is there…
CafeHey
  • 5,699
  • 19
  • 82
  • 145
4
votes
1 answer

C# Word Interop, Pasting Clipboard into Paragraph

I have a report builder I'm making that builds the start of a report in word. Word is then kept open for the user to carry on with the report. The report builder gets rtf from a database that is to be used as paragraphs. For each rtf a paragraph is…
Stuart Thomson
  • 509
  • 5
  • 21
4
votes
1 answer

How to convert using PANDOC a markdown file to rtf

I am new to pandoc and I am strugling to get a file convesion done. I want to convert a markdown file to a rtf file. pandoc -f markdown -f rtf 1.md -o file.rtf I am using the following command, however it just does not do the work correctly, as it…
4
votes
0 answers

How to copy formatted text from a Word document into VS Code as HTML

I'm copying text from a Word document into an HTML file, but I couldn't find a way to preserve the text formatting (bold, italic, etc.). For now the only way I found to do this was to use any online RTF editor, pasting the Word text and copying the…
4
votes
0 answers

How can I incorporate a RTF doc into a SwiftUI View?

I want to be able to create and edit a RTF doc for read-only information via Xcode (or external word processor) and display it within a SwiftUI view rather than to code a string piecemeal with in-line format directives. The closest way of doing…
Frederick C. Lee
  • 9,019
  • 17
  • 64
  • 105
4
votes
2 answers

Extracting images from RichTextBox

I have an application where users may insert images into a RichTextBox. I'd like to be able to replace all the images in the RTF with some token and store the images in separate files. I'll inject the images back into the RTF later. I've…
Sedes
  • 563
  • 6
  • 11
4
votes
4 answers

Suppress line break in a RichTextBox at certain positions

I need to suppress some linebreaks in a RichTextBox. For example, consider d6+. There must not be a line break between 6 and +. Basically I'm looking for something like in HTML. So far, I've messed around with inserting \u+FEFF etc (which…
Eiko
  • 25,601
  • 15
  • 56
  • 71
4
votes
1 answer

Cell shading in RTF documents

Does anyone know the the rtf tags for applying a background color to a table cell? I know the table structures: {\rtf1\ansi\deff0 \trowd \clshdng10000\cellx1000 \clshdng10000\cellx2000 \clshdng10000\cellx3000 cell 1\intbl\cell cell…
stoic
  • 4,700
  • 13
  • 58
  • 88
4
votes
0 answers

Is there any way to alter security settings of newest version of Wordpad to prevent showing the message about blocked content?

In the latest version of Windows 10 (1903), a security protection has been added to Wordpad. When there is some specific content in the document, it is blocked and the document is marked as not trusted - a warning message is shown when trying to…
4
votes
4 answers

php to rtf, é becomes é

Using this rtf class, I see my special characters getting converted, like é becomes \'C3\'A9 (that part is probably not the problem) Once I get it in rtf using php header, the resulting character (é) is seen as é. header("Content-type:…
Jeremy Roy
  • 1,291
  • 5
  • 18
  • 31
4
votes
1 answer

Classic Rich Text Format in a webpage

I am trying to build a webpage in which a user can edit a Rich Text that comes from an RTF blob. RTF is saved with "Classic format", so for example the content of the blob is like this: {\rtf\ansi\deff0{\fonttbl{\f0\froman Tms Rmn;}{\f1\fdecor…
UnDiUdin
  • 14,924
  • 39
  • 151
  • 249
4
votes
3 answers

Insert an image into RTF document in C#

I am creating a RichTextBox subclass that can insert images easily. I referred to this question to start, but I can't get the generated RTF string to work. When I try to set the SelectedRtf of the RTB, it errors out with "File format is not…
Jared
  • 2,043
  • 5
  • 33
  • 63
4
votes
1 answer

How to make a nested table in Rich Text Format (rtf)

How do you make a table within a cell in rtf? Here's the simplest table I know: {\rtf\ansi\deff0 \trowd \intbl \cellx1000 Item 1\cell \cellx2000 Item 2\cell \row } How do I replace Item 1 and Item 2 with tables that have an arbitrary number of…
dmodo
  • 221
  • 3
  • 15
4
votes
7 answers

Broken tables in RichTextBox control (word wrap)

Possible Duplicate: Why isn’t the richtextbox displaying this table properly? We are having problems with the Windows.Forms.RichTextBox control in Visual Studio 2008. We are trying to display text supplied as an RTF file by a 3rd party in a…
Ben Robbins
  • 2,889
  • 2
  • 31
  • 32
4
votes
1 answer

Extract table from NSAttributedString

Suppose I have read NSAttributedString from a file (html or rtf) and in that file I clearly see several tables. Is there a way to extract those tables or at least find an NSRange that corresponds to the table? It would be ideal if I could somehow…
alagris
  • 1,838
  • 16
  • 31