rtf

Laying out graphics in RTF

I'm interested how to construct certain kinds of layout in RTF documents, ideally using techniques that do not depend only on the most recent RTF standards, and that are "native", i.e., they do not involve embedding other representations, like picture files. In particular: In Postscript and DVI, I can specify a coordinate at any time ...

How to view the source rtf of a Word document?

I need to create a .doc document in C# with specific rtf format. I have a document that I need to replicate in my code but I don't know how to view this documents rtf representation? I don't think copying the content to RichTextBox will help cause I need margin settings and other document, not content, related settings to replicate. Any ...

Insert string with special characters into RTF

How to programatically insert string with special characters into RTF? I have rtf template I load to string and then replace all $MY_VARIABLE$ with data. Data contains special chars like 'ąęść' and the problem is that in result file these characters are replaced with '?'. It's something wrong with encoding but what? My code looks like:...

RTF Trademark character (™)

I am trying to represent the trademark character in an RTF document. In HTML, I can use the entity ™, which generates the character . This does not work in RTF. I have also tried &#U153; but that does not work either. Any ideas on how to do this? ...

Convert HTML to RTF (HTML2RTF converter)

I'm looking for a simple HTML2RTF converter that I can use on my website which is using a *nix like Operating System. I haven't found anything on the internet, and was hoping the SO community would help me. PS: I don't want to implement this from scratch, and it doesn't really matter what language it's in, as long as I can run it on a *...

Why do hyperlinks sometimes not show in an NSTextField with an NSAttributedString?

The text I use in an NSTextField is loaded from a file as follows. NSString *path = [[NSBundle mainBundle] pathForResource:@"Credits" ofType:@"rtf"]; NSAttributedString *as = [[NSAttributedString alloc] initWithPath:path documentAttributes:NULL]; [creditsLabel setAttributedStringValue:as]; [creditsLabel becomeFirstResponder]; The hyp...

Changing font color in WordPad

Hi All, Is it possible to change the font color of text while redirecting it to WordPad? Examples: C:\echo greencolor >> C:\colors.rtf -----> This text should appear green in WordPad C:\echo redcolor >> C:\colors.rtf -----> This text should appear red in WordPad C:\echo browncolor >> C:\colors.rtf -----> This text should appear brow...

What encoding does the System.Windows.Forms.RichTextBox use for unicode chars?

I've got a WinForms RichTextBox in my application. When I enter the Chinese text "蜜蜜蜜蜜", the control uses the following RTF: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fmodern\fprq6\fcharset134 SimSun;}{\f1\fnil\fcharset0 Microsoft Sans Serif;}} \viewkind4\uc1\pard\f0\fs17\'c3\'db\'c3\'db\'c3\'db\'c3\'db\f1\par } The test s...

Apostrophe issue in RTF

I have a function within a custom CRM web application (old VB.Net circa 2003) that takes a set of fields from a database and merges them with palceholders in a set of RTF based template documents. These generate merged letters and documentation. The code essentially loops through each line of the RTF template file and replaces any instan...

NSDocument read RTFD Data

Hi, I am working on a text editor and I want to add RTFD support. After adding the RTFD file type to my Info.plist, I got the message that "readFromFileWrapper:ofType:error: must be overridden for your application to handle file packages." I had a look around in the documentation and found some things, but I didn't manage to do everyth...

How to convert HTML to RTF in Perl?

I want a way to convert some basic html tags into RTF (like I, B, BR) Is there any simpler way to do that without paying for anything? Developing something from scratch is an option too. ...

NSTextView determine if NSTextAttachment is present

Hi, in my MyDocument class I need to determine if there is an image in my NSTextView, so I can prevent users from saving documents as RTF although RTF doesn't support images. Could someone point me in the right direction? ...

Send mail using RTF text as Body

Hi, I'm trying to create a mail message using some RTF text as the mail.body, but there's no IsRtfBody property on System.Net.Mail.MailMessage only IsHtmlBody. The test-mails I've received all contain {\rtf1\deff0{\fonttbl{\f0 Times New Roman;}{\f1 Verdana;}}{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}{\*\listoverridetable}{\...

Problems exporting a 3305 page report (95000 records) using Crystal Reports 8 to RTF/Word/Excel

I'm having problems exporting a 3305 page report (95000 records) using CR 8 to RTF. When exporting a TXT file, it works. But... When exporting a large RTF, the program hangs at about 42% of the export process. Later it frees up the system, appears to finish, and outputs a file. The file itself is not complete (many records missing...

Is CFE_LINK stored in RTF RichEdit 3.0?

I am using MS TextServices to implement windowless rich text editing and setting CFE_LINK to create hyperlinks. This all works but when I save the text to my internal buffer for writing to a file the CFE_LINK effect isn't saved. I have (tried to) ensured that AutoDetectURL is OFF. I am using EM_STREAMOUT to save from editor to buffer, ...

Write a *.doc or *.rtf file from a c/c++ application

How can I write to/generate a *.doc file programmatically using c or c++? Is there a (open source/cross platform) library to do this? If this is not possible, can write an *.odt file and then convert it to *.doc? Thanks in advance! EDIT: Anders Abel commented that *.rtf file type is an option, so any suggestions on this one are also acc...

how to print Rich text box contents on any device contenxt with proper formatting?

Hi, i would like to print the rich text box contents with formatting to any device context, for example I would like to print on panel or any other control which is associated to actual print device. I am simulating print preview using panel by drawing some contents from a custom designed form, rich text content is one among the conte...

Delphi: How to use TJvRichEdit to load or save text and images (not just .bmp) to file or firebird blob field?

Regarding TJvRichEdit and Delphi... How? Load/Save rtf (including text and images - not only .bmp) to/from a file? Read/Write rtf (including text and images - not only .bmp) to/from Firebird blob field? Automatically convert screendump pasted from clipboard (Ctrl-V) into .jpg format before it is inserted into the TJvRichEdit rtf? Gui...

A better way of converting Codepage-1251 in RTF to Unicode

I am trying to parse RTF (via MSEDIT) in various languages, all in Delphi 2010, in order to produce HTML in unicode. Taking Russian/Cyrillic as my starting point I find that the overall document codepage is 1252 (Western) but the Russian parts of the text are identified by the charset of the font (RUSSIAN_CHARSET 204). So far I am: 1...

Understanding RTF and edit it with vb.net

I have this RichTextbox in my vb.net form and I would like to when a user click a button, for example to embold the selected text, how would I do this. Also, I do NOT want to use the standard vb.net expressions such as RichTextBox1.SelectedText.Font.Bold = true. I want to do something like RichTextbox1.SelectedRTF="[bold]" & RichTextBox...