rtf

iOS Objective C: Display RTF document

爷,独闯天下 提交于 2020-01-01 08:49:42
问题 I want to show a RTF document in a view. This document will be developed in Microsoft Word and will contains images. What is the best way to do this using standard routines provided? I would really like sample code to load a RTF document from the bundle. Kind Regards, Jason 回答1: UIWebView opens .rtf documents. Try something like NSURL *rtfUrl = [[NSBundle mainBundle] URLForResource:@"MyFileName" withExtension:@"rtf"]; NSURLRequest *request = [NSURLRequest requestWithURL:rtfUrl]; [_webview

In Idle cannot access RichTextControl or IME will not work

戏子无情 提交于 2019-12-31 04:51:11
问题 When reading some RichTextControl properties inside Application.Idle some IME won't work. Given this simple code: _richTextControl = new RichTextControl(); Application.Idle += delegate(object sender, EventArgs e) { btnCopy.Enabled = _richTextControl.SelectionLength > 0; btnPaste.Enabled = _richTextControl.CanPaste(); }; It'll work fine with most IME I tried but, at least, for Chinese (Traditional, Taiwan) with Microsoft Chinese Traditional Array (6.0) and Chinese Traditional DaYi (6.0) it'll

Euro sign issue when reading an RTF file with Python

心已入冬 提交于 2019-12-31 03:24:06
问题 I need to generate a document in RTF using Python and pyRTF, everything is ok: I have no problem with accented letters, it accepts even the euro sign without errors, but instead of € , I get this sign: ¤ . I encode the strings in this way: x.encode("iso-8859-15") I googled a lot, but I was not able to solve this issue, what do I have to do to get the euro sign? 回答1: The RTF standard uses UTF-16, but shaped to fit the RTF command sequence format. Documented at http://en.wikipedia.org/wiki/Rich

Convert Special Characters for RTF

有些话、适合烂在心里 提交于 2019-12-31 02:44:26
问题 Can someone please assist me with converting special characters to something that can be correctly represented in an RTF file? I am taking text stored in a string on the iPad and outputting it as an RTF file using NSASCIIStringEncoding. So far so good. What I've neglected to do successfully, is take into account special characters (e.g. tilde, umlaut, accent, etc.) . Sorry RoW! The most universal RTF format seems to want 8-bit text encoding with code page escape (two hexadecimal digits

HTML to RTF Converter for .NET

耗尽温柔 提交于 2019-12-30 09:59:10
问题 I've already seen lots of posts on the site for RTF to HTML and some other posts talking about some HTML to RTF converters, but I'm really trying to get a full breakdown of what is considered the most widely used commercial product, open source product or if people recommend going home grown. Apologies if you consider this a duplicate question, but I'm trying to create a product matrix to see what is the most viable for our application. I also think this would be helpful for others. The

Richtextbox draw an rtf line

≡放荡痞女 提交于 2019-12-30 01:47:06
问题 I want to add a horizontal line to the RichTextBox as a delimiter of my text. I've found some examples of RTF code implementing a line and tried them in that way: rtbResFile.Rtf = @"{\rtf1{\pard some text.\par}{\pard \brdrb \brdrs \brdrw10 \brsp20 \par}{\pard \par}{\pard some other text.\par}}"; This way implements creating a blank paragraph with border, so that should looks like a line. However it doesn't show anything. Just a blank paragraph. Even if I try to implement it in the way include

Convert RTF (Rich Text Format) code into plain text in Excel

六眼飞鱼酱① 提交于 2019-12-29 09:08:59
问题 I exporting a database query as Excel and I am getting rows with RTF formatting. How can I convert these fields into plain text? I've found answers that are pretty old, so I was wondering if anyone knows a way. 回答1: Another alternative can be using Microsoft Rich Textbox Control (but can't test it on x64 Office) Sub rtfToText() With CreateObject("RICHTEXT.RichtextCtrl") ' or add reference to Microsoft Rich Textbox Control for early binding and With New RichTextLib.RichTextBox .SelStart = 0 '

Convert RTF (Rich Text Format) code into plain text in Excel

 ̄綄美尐妖づ 提交于 2019-12-29 09:08:04
问题 I exporting a database query as Excel and I am getting rows with RTF formatting. How can I convert these fields into plain text? I've found answers that are pretty old, so I was wondering if anyone knows a way. 回答1: Another alternative can be using Microsoft Rich Textbox Control (but can't test it on x64 Office) Sub rtfToText() With CreateObject("RICHTEXT.RichtextCtrl") ' or add reference to Microsoft Rich Textbox Control for early binding and With New RichTextLib.RichTextBox .SelStart = 0 '

Regular Expression for extracting text from an RTF string

a 夏天 提交于 2019-12-27 10:26:07
问题 I was looking for a way to remove text from and RTF string and I found the following regex: ({\\)(.+?)(})|(\\)(.+?)(\b) However the resulting string has two right angle brackets "}" Before: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Shell Dlg 2;}{\f1\fnil MS Shell Dlg 2;}} {\colortbl ;\red0\green0\blue0;} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\tx720\cf1\f0\fs20 can u send me info for the call pls\f1\par } After: } can u send me info for the call

Reading RTF File Containing an OLE Embedded Object

隐身守侯 提交于 2019-12-25 17:18:28
问题 Question : I need to read an RTF File that contains an OLE Object as innerdocument. RTF File = [ Ole object (word document) is embedded into it.] Sample RTF File that contains word as OLE Embedded into it. Reference I have done : OLE as Image in RTF Here they have done a program to extract the image embedded as OLE in RTF. I had extracted the program which is marked as correct answer , but its does not work for me. Using OpenXML SDK. (it cannot be able to open RTF Files.) some other SDK like