rtf

Convert Rtf to HTML [closed]

删除回忆录丶 提交于 2019-11-26 10:35:14
We have a crystal report that we need to send out as an e-mail, but the HTML generated from the crystal report is pretty much just plain ugly and causes issues with some e-mail clients. I wanted to export it as rich text and convert that to HTML if it's possible. Any suggestions? I would check out this tool on CodeProject RTFConverter. This guy gives a great breakdown of how the program works along with details of the conversion. Writing Your Own RTF Converter Mike Stall posted the code for one he wrote in c# here : http://blogs.msdn.com/jmstall/archive/2006/10/20/rtf_5F00_html.aspx There is

Regular Expression for extracting text from an RTF string

那年仲夏 提交于 2019-11-26 10:30:01
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 pls } Any thoughts on how to improve the regex? Edit: A more complicated string such as this one does

How to convert a string to RTF in C#?

只愿长相守 提交于 2019-11-26 09:51:32
问题 Question How do I convert the string \"Européen\" to the RTF-formatted string \"Europ\\\'e9en\"? [TestMethod] public void Convert_A_Word_To_Rtf() { // Arrange string word = \"Européen\"; string expected = \"Europ\\\'e9en\"; string actual = string.Empty; // Act // actual = ... // How? // Assert Assert.AreEqual(expected, actual); } What I have found so far RichTextBox RichTextBox can be used for certain things. Example: RichTextBox richTextBox = new RichTextBox(); richTextBox.Text = \"Européen\

How to output unicode string to RTF (using C#)

帅比萌擦擦* 提交于 2019-11-26 09:46:09
问题 I\'m trying to output unicode string into RTF format. (using c# and winforms) From wikipedia: If a Unicode escape is required, the control word \\u is used, followed by a 16-bit signed decimal integer giving the Unicode codepoint number. For the benefit of programs without Unicode support, this must be followed by the nearest representation of this character in the specified code page. For example, \\u1576? would give the Arabic letter beh, specifying that older programs which do not have

Is there a Python module for converting RTF to plain text? [closed]

半腔热情 提交于 2019-11-26 09:39:18
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 months ago . Ideally, I\'d like a module or library that doesn\'t require superuser access to install; I have limited privileges in my working environment. 回答1: OpenOffice has a RTF reader. You can use python to script OpenOffice, see here for more info. You could probably try using the magic com-object on Windows to read

Can anyone recommend a Java rich text editor? [closed]

╄→尐↘猪︶ㄣ 提交于 2019-11-26 09:27:10
问题 The rich text editor must be implemented in Java, provide Swing support, and preferably be open source. I\'m looking to integrate it into an existing Java/Swing application. Thanks. 回答1: This is probably not as drop-in-place as what you were after... but JTextPane supports rich text and HTML. Its trivial to get it to display rtf or html, just set the encoding type before you fill it with content. As for making the little "B" and " I " etc style-modifying buttons, well if it came down to it,

Programmatically adding Images to RTF Document

房东的猫 提交于 2019-11-26 08:15:36
问题 I am trying to add a image to a RTF document which I am creating. I would prefer to not use \'copy/paste\' methods (that involve pasting the image within a RichTextBox and then accessing the .RTF property) which purge the clipboard (as this will be a bother and confusion for my end users). The code I have so far returns the string that needs to be inserted into the RTF document to print the image. The inputted image (located at $path) is usually in bmp or jpeg format, but at this stage I am

How do I convert HTML to RTF (Rich Text) in .NET without paying for a component?

谁说胖子不能爱 提交于 2019-11-26 07:25:39
问题 Is there a free third-party or .NET class that will convert HTML to RTF (for use in a rich-text enabled Windows Forms control)? The \"free\" requirement comes from the fact that I\'m only working on a prototype and can just load the BrowserControl and just render HTML if need be (even if it is slow) and that Developer Express is going to be releasing their own such control soon-ish. I don\'t want to learn to write RTF by hand, and I already know HTML, so I figure this is the quickest way to

How can I insert an image into a RichTextBox?

泄露秘密 提交于 2019-11-26 02:54:41
问题 Most of the examples I see say to put it on the clipboard and use paste, but that doesn\'t seem to be very good because it overwrites the clipboard. I did see one method that manually put the image into the RTF using a pinvoke to convert the image to a wmf. Is this the best way? Is there any more straightforward thing I can do? 回答1: The most straightforward way would be to modify the RTF code to insert the picture yourself. In RTF, a picture is defined like this: '{' \pict (brdr? & shading? &

Convert Rtf to HTML [closed]

北慕城南 提交于 2019-11-26 02:11:55
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . We have a crystal report that we need to send out as an e-mail, but the HTML generated from the crystal report is pretty much just plain ugly and causes issues with some e-mail clients. I wanted to export it as rich text and convert that to HTML if it\'s possible. Any suggestions? 回答1: I would check out this