rtf

Detect Multibyte and Chinese Characters in rtf markup

巧了我就是萌 提交于 2019-12-04 16:52:29
I'm trying to translate parse a RTF formatted message (I need to keep the formatting tags so I can't use the trick where you just paste into a RichTextBox and get the .PlainText out) Take the RTF code for the string a基bমূcΟιd pasted straight into Wordpad: {\rtf1\ansi\ansicpg1252\deff0\deflang2057{\fonttbl{\f0\fnil\fcharset0 Calibri;}{\f1\fswiss\fcharset128 MS PGothic;}{\f2\fnil\fcharset1 Shonar Bangla;}{\f3\fswiss\fcharset161{\*\fname Arial;}Arial Greek;}} {\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22 a\f1\fs24\'8a\'ee\f0\fs22 b\f2\fs24\u2478?\u2498

how can i show doc or rtf or pdf in flash player or in none editble format

孤者浪人 提交于 2019-12-04 16:50:06
i need to show in my web application document that is in pdf or rtf format in some kind of none edible format that can't be changed and cant be downloaded the perfect candidate is the flash player , but i know the tool that converting pdf or rdf to swf is not free. im looking for free solutions , does not have to be flash . Use pdf2swf and in general the SWF tools. Just use Flashpaper , which can convert every format to non-editible flash. It installs a printer, so to convert say a Word document, you just have to go to Word and print the document with the Flash Paper printer. It prints a non

Insert string with special characters into RTF

十年热恋 提交于 2019-12-04 15:32:39
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: StreamReader reader = new StreamReader("template.rtf"); StringBuilder form = new StringBuilder(reader.ReadToEnd()); // here I replace variables in rtf with data Encoding srcEncoding = new UTF8Encoding(); Encoding dstEncoding = new ASCIIEncoding(); byte[] utf =

WPF: Allow user to resize images in RichTextBox

旧街凉风 提交于 2019-12-04 13:24:28
问题 Is there a method within the RichTextBox control in WPF to allow for the user to resize inserted images, or do you have to devise your own method for this. What I'm trying to achieve is shown below, a screenshot of a WordPad doing what I want: Notes: Reading the RTF file as plain text I find that the control tags related to image size is \picscalex100 and \picscaley100 (where 100 denotes scaled to 100%). So yeah, is there a proper way or trick to this? Any advice on how to go about

How to Convert Simple RichText to HTML tags in Delphi?

 ̄綄美尐妖づ 提交于 2019-12-04 13:04:01
问题 You may say that there are lots of discussions about this in stackOverflow, but most of them are more complicated than what I need and mostly for other languages. I have a MySQL remote database in which I have a "Help" table with the code for filling the help pages of the dynamic web site that uses this database. I decided to make a Delphi application to manage that website instead of doing by the web site itself for more speed and security. I want to put a TRichEdit to make that help text

Creating RTF , DOC , or DOCX in iOS

谁说我不能喝 提交于 2019-12-04 10:22:07
I want to create one of the following filetypes with an iOS-App: RTF, DOC or DOCX. The user should be able to write text and also add images to it. The building of the UI isn´t the problem, only the creating of the File. Are there any best practice to do this?! 3rd Party Frameworks are an option, but i would like to do it myself. Thanks I can help you for docx files (RTF files are easier and doc files are quite the same as docx but less well organised) I think the best you could do is to start by opening a docx file into a text editor. You have first to unzip the file. You will have the

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

隐身守侯 提交于 2019-12-04 09:02:51
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 hyperlinks in the window don't render in blue underline unless I first click somewhere on the NSTextField, as per the two screenshots. How can I make these hyperlinks always look like hyperlinks? Here's the RTF: {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf250 {

Strange shift when Selecting text in richtext box v5 that contains hyperlinks

点点圈 提交于 2019-12-04 07:37:37
When I use the RichTextBox.Select(int start, int length) function to select text in a rich text box that contains hyperlinks, there is some shift in the selection when I try to select any text that is after the hyperlink. When I remove the hyperlink, the selection works properly. Edit: I use RichTextBox 5 (the default in Visual Studio is version 4) public class RichText50W : RichTextBox { [DllImport("kernel32.dll", CharSet = CharSet.Auto)] static extern IntPtr LoadLibrary(string lpFileName); protected override CreateParams CreateParams { get { CreateParams prams = base.CreateParams; if

What is the best solution for converting RichTextFormat info to HTML in C#?

女生的网名这么多〃 提交于 2019-12-04 06:07:45
What is the best solution for converting RichTextFormat info to HTML in C#? I know there are libraries out there that do this, and I was curious to see if you guys had any advice as to which ones are the better ones. Thanks, Jeff Tony Peterson I recently used a RTF to HTML conRTverter that worked great, called DocFrac. It can be used with a GUI to convert files, but it also is a DLL. I converted over 400 RTF files to HTML in a few minutes so performance is good too. I used the GUI so I don't have the details on the DLL. According to the site the DLL works with .NET however. DocFrac at

RTF to TEXT conversion using perl

有些话、适合烂在心里 提交于 2019-12-04 05:03:09
问题 Can somebody tell me how can we convert the rtf file into text with all the tags, tables and formatted data using perl programming language ? @Ahmad Bilal , @petersergeant : I have been using the below code for RTF to TXT conversion and i am able to convert into text. But the problem is i am unable to capture table or image formats and even all the entities in the inputfile are not captured using the program. use 5.8.0; use strict; use warnings; use Getopt::Long; use Pod::Usage; use RTF: