rtf

Unicode RTF text in RichEdit

泪湿孤枕 提交于 2019-12-18 02:49:17
问题 I'm having trouble getting a RichEdit control to display unicode RTF text. My application is Unicode, so all strings are wchar_t strings. If I create the control as "RichEdit20A" I can use e.g. SetWindowText, and the text is displayed with the proper formatting. If I create the control as "RichEdit20W" then using SetWindowText shows the text verbatim, i.e. all the RTF code is displayed. The same happens if I use the EM_SETTEXTEX parameter, specifying codepage 1200 which MSDN tells me is used

Convert RTF to and from plain text

情到浓时终转凉″ 提交于 2019-12-17 20:34:26
问题 I have a requirement to convert plain text to and from RTF (RichText Format) using javascript. I am looking for a function for each conversion, and I am not looking to use a library. Conversion from plain to RTF The formatting styles and colours are not important, all that matters is that the plain text i converted into a valid RTF format Conversion from RTF to plain Again, the styles are not important. They can be completed removed. All that is required is that all text data remains (no loss

C# .net converting HTML to RTF

馋奶兔 提交于 2019-12-17 19:39:09
问题 Theres another post at HTML to RTF Converter for .NET, but are there any open source converters or tutorials? I don't want to use Sautinsoft. I think there is a solution at ExpertsExchange, but I have to pay for that. Most of the search results on google point to an RTF to html converter, but not a html to RTF converter. 回答1: The ExpertsExchange article is a poor one at best. Basically the OP gave up because they couldn't give a good answer. They list a link to the CodeProject article ( http:

Extract Embedded Image Object in RTF

穿精又带淫゛_ 提交于 2019-12-17 09:32:42
问题 I have rtf documents that include an embedded object (an image). I need to extract this as an Image object (or any other usable format). I have checked out this CodeProject article but the default apps don't render it correctly (They render the 'default image' image, not the image itself), so I moved on. Here is a sample of the RTF Code (I had to shorten it because of size): {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\lang1033\f0\fs18{\object\objemb{\*

What is the RTF syntax for a hyperlink?

老子叫甜甜 提交于 2019-12-17 05:04:57
问题 HTML is to <a href="x">y</a> as RTF is to _______ ? 回答1: {\field{\*\fldinst HYPERLINK "http://www.google.com/"}{\fldrslt http://www.google.com}} 回答2: The last article works fine. I even took it further to display multiple links (and replaced \par to \line tags in order to stay in the same paragraph). {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}} {\colortbl ;\red0\green0\blue255;} {\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\sa200\sl276\slmult1

宏病毒刨析

核能气质少年 提交于 2019-12-15 10:03:39
拿到宏病毒之后,先使用oledump.py工具进行宏数据流得查看: 通过查看数据流可以发现,在第八段和第九段有宏代码,同时需要注意在第十二的数据虽然没有宏代码 ,但是第12段数据大小却是很可疑需要注意一下,同时也可以将第八段和第九段以及第十二段 这三段数据dump出来 进行查看。这里采用宏病毒动态调试的方式: 打开文件之后,存在安全警告: 这个时候,可以使用快捷键 打开并且查看宏代码(alt+F11),但是打开窗口之后发现并没有宏代码,只是因为这个时候还没有启用宏,VB宏代码并没有引用,点击启用宏(这个时候宏代码已经运行),这时就可以查看文件当中的宏代码: 但是这时,查看宏代码的时候 提示要输入密码,不知道密码也就只有破解一途,用010打开该文档 搜索DPB 将之修改为DPX 之后保存。再打开文档之后,忽略错误 就可以顺利地看到宏代码了: 动态调试的过程也就不具体介绍,宏代码的主要动作如下: 1:拼接TEMP路径:C:\User\sam\AppData\Local\TEMP 2:拼接fhew.rtf路径和hrbs.rtf路径以及t2.tmp路径 3:将源DOC文件另存为fhew.rtf和hrbs.rtf 采用ActiveDocument.SaveAs 4:采用CreateObject 来执行Microsoft word 执行fhew.rtf 5:使用Shell函数 执行t2.tmp

Java RTF import, edit and export possible?

前提是你 提交于 2019-12-14 01:02:53
问题 I use Apache Tika to parse RTF files to get the plaintext as string. Now I want to remove some characters from this string -> ok. Now I want to save the result as RTF again. (You can think of this process as modifying an RTF file by deleting a paragraph.) How is this possible? How can I export this string to RTF with Tika? 回答1: There is a solution to edit docs, but it is a little complex. You can use the OpenOffice API to open a lot of types of docs and export it to other formats. I used it,

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

混江龙づ霸主 提交于 2019-12-14 00:25:11
问题 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 . 回答1: Use pdf2swf and in general the SWF tools. 回答2: Just use Flashpaper, which can convert every format to non-editible flash. It installs a printer, so to convert say a

Convert RTF Stream to Plain Text Stream

独自空忆成欢 提交于 2019-12-13 18:15:33
问题 I have crystal report and I need to convert it to text file. Currently I can only convert it to RTF Stream. Now I need to convert the RTF Stream to Text Stream. I am using C#. Thanks. 回答1: Correct me if I am wrong but you are using the ExportToStream method with ExportFormatType.RichText: Stream stream = report.ExportToStream(ExportFormatType.RichText); This exports the report into an RTF stream. Now you wish to convert this stream to plain text (extract the text from the RTF). If that's true

Convert PDF to RTF in Java [closed]

戏子无情 提交于 2019-12-13 14:55:47
问题 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 5 years ago . Does anyone know of an easily available library or SDK which can be used to convert a PDF document to RTF in Java? 回答1: Take another look at iText (I know that direct PDF -> RTF conversion isn't supported - but read on for spine tingling possibilities!). We added a PDF text parsing module to iText last year.