rtf

Merge multiple doc or rtf files into a single doc or rtf file by using php script

雨燕双飞 提交于 2019-12-20 03:10:02
问题 I would like to merge multiple doc or rtf files into a single file which should be the same format of multiple files. What I mean is that if a user selects multiple rtf template files from a list box and clicks on a button on web page, the output should be a single rtf file which combines multiple rtf template files, I should use php for this. I haven't decided the format of template files, but it should be either rtf or doc, and also I assume that template file has some images as well. I

Copying .rtf text into the body of an email with AppleScript

非 Y 不嫁゛ 提交于 2019-12-19 11:27:50
问题 I have an AppleScript application which creates an email (in Mail.app) with attachments from the options I choose through dialogs. The text templates are stored in .rtf format so non-programers can alter the text templates to their wishes. I am able to create an email from a .txt plain text file, but when I import an .rtf text file it imports the formatting commands, which I don’t want in the mail. Here is an example of a .rtf import into an email: {\rtf1\ansi\ansicpg1252\cocoartf1038

RTF equivalent to UIWebView's loadHTMLString?

空扰寡人 提交于 2019-12-19 10:12:48
问题 Since OS 3.0 UIWebView supports RTF files. If you have a .rtf file, it's easy enough to load it into a uiwebview, e.g. NSString *path = [[NSBundle mainBundle] pathForResource:documentName ofType:nil]; NSURL *url = [NSURL fileURLWithPath:path]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [webView loadRequest:request]; When loading HTML stored in a string variable, you can use loadHTMLString . How would one load RTF stored in a string directly into a UIWebView ? For example, if

Encoding of rtf file

心不动则不痛 提交于 2019-12-18 09:38:16
问题 I get a base64 encoded string which represents a rtf-file. If I look the original text representation (before base64 encode) I see the character sequence F¸r . This should stand for Für , when displayed in a viewer. The header of the rtf-file contains ansicpg1252 so this should be the encoding except otherwise changed (escape sequences, font definitions, ..). My problem now is that I can't correctly decode the base 64 string to its original representation. I never get F¸r anymore. Instead I

Writing unicode to rtf file

♀尐吖头ヾ 提交于 2019-12-18 09:23:09
问题 I´m trying write strings in diffrent languages to a rtf file. I hav tried a few different things. I use japanese here as an example but it´s the same for other languages i have tried. public void writeToFile(){ String strJapanese = "日本語"; DataOutputStream outStream; File file = new File("C:\\file.rtf"); try{ outStream = new DataOutputStream(new FileOutputStream(file)); outStream.writeBytes(strJapanese); outStream.close(); }catch (Exception e){ System.out.println(e.toString()); } } I alse have

Converting from rich text format to plain text problems

孤街浪徒 提交于 2019-12-18 08:53:18
问题 We currently have an application (Windows service) that connects to another of our applications and grabs invoices. In the invoices there is a RTF field for the footer/header fields. When we grab the data the RTF is converted to plain text with the following code: public static string ConvertFromRTFToPlainText(string rtfString) { if (rtfString == null) return null; System.Windows.Forms.RichTextBox rtBox = new System.Windows.Forms.RichTextBox(); if (rtfString.StartsWith("{\\rtf1")) rtBox.Rtf =

Converting from rich text format to plain text problems

廉价感情. 提交于 2019-12-18 08:51:36
问题 We currently have an application (Windows service) that connects to another of our applications and grabs invoices. In the invoices there is a RTF field for the footer/header fields. When we grab the data the RTF is converted to plain text with the following code: public static string ConvertFromRTFToPlainText(string rtfString) { if (rtfString == null) return null; System.Windows.Forms.RichTextBox rtBox = new System.Windows.Forms.RichTextBox(); if (rtfString.StartsWith("{\\rtf1")) rtBox.Rtf =

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

拥有回忆 提交于 2019-12-18 07:42:12
问题 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 回答1: I'd use an external library instead of coding your own. Check these projects: http://sourceforge.net/projects/netrtfwriter/ http://www.codeproject.com/Articles/11306/NRTFTree-A-class-library-for-RTF-processing-in-C You might also be able to use the Rtf property of the RichTextBox control (if your users are entering data in such a control). 回答2: As the

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

≡放荡痞女 提交于 2019-12-18 07:42:09
问题 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 回答1: I'd use an external library instead of coding your own. Check these projects: http://sourceforge.net/projects/netrtfwriter/ http://www.codeproject.com/Articles/11306/NRTFTree-A-class-library-for-RTF-processing-in-C You might also be able to use the Rtf property of the RichTextBox control (if your users are entering data in such a control). 回答2: As the

Paste without rich text formatting into EditText

蓝咒 提交于 2019-12-18 04:36:18
问题 If I copy/paste text from Chrome for Android into my EditText view it gets messed up, apparently due to rich text formatting. Is there a way to tell the EditText view to ignore rich text formatting? Or can I catch the paste event and remove it before it gets set? How would I do that? UPDATE: So I realized that the editText.getText() gives me a SpannableString that contains some formatting. I can get rid of that by calling .clearSpans(); on it. BUT I cannot do anything like that in editText