rtf

Reading RTF directly to a TextView on Android

99封情书 提交于 2021-02-19 08:09:06
问题 I have a RTF file saved in a database column, i need to read that text and display it with style into a TextView on the Android. From what i have searched, i didn't find how to read RTF directly on the android. What i have tried are: Searching for something to convert RTF to HTML (on the web service (C#) and on the Android) (I haven't found a suitable solution, found this but i didn't know how to use it... too many classes and i didn't know how to deal with it, i will try again until someone

Retaining font size when loading/saving RTF in WPF

拜拜、爱过 提交于 2021-02-19 00:50:46
问题 Consider the following RTF document {\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fswiss\fprq2\fcharset0 Segoe UI;}{\f1\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs22 Sample Text\f1\fs20\par } It contains "Sample Text" in font Segoe UI 11 pt. Now when I load and then save the document using WPF's FlowDocument and TextRange.Load() and .Save(), respectively, the font size is reduced to 10.5pt. Is there any way to retain the original font size

Retaining font size when loading/saving RTF in WPF

自古美人都是妖i 提交于 2021-02-19 00:48:03
问题 Consider the following RTF document {\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fswiss\fprq2\fcharset0 Segoe UI;}{\f1\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs22 Sample Text\f1\fs20\par } It contains "Sample Text" in font Segoe UI 11 pt. Now when I load and then save the document using WPF's FlowDocument and TextRange.Load() and .Save(), respectively, the font size is reduced to 10.5pt. Is there any way to retain the original font size

Hyperlinks without underline in RichTextBox on Windows 10 1803

倖福魔咒の 提交于 2021-02-18 10:21:08
问题 I'm displaying RTF document in RichTextBox ("upgraded" to RichEdit50W ). Keywords in the document are linked to a webpage using a syntax: {\field{\*\fldinst{HYPERLINK ""https://www.example.com/"" }}{\fldrslt{\cf1 keyword\cf0 }}} I do not want to underline the keywords. Until Windows 10 version 1803 (and in all previous versions of Windows, including XP, Vista, 8), whenever a color was set on the anchor (note the \cf1 ), the anchor was not underlined. But this no longer works in Windows 10

A way to overcome RichTextBox's limitations?

妖精的绣舞 提交于 2021-02-11 15:24:48
问题 I am developing an app using WinForms and the RichTextBox control. This control allows different changes to the RTF formatting using a property to change the font of the selected text. I have a button to toggle bold on the text: richTextBoxEditor.SelectionFont = new Font(richTextBoxEditor.SelectionFont, richTextBoxEditor.SelectionFont.Style ^ FontStyle.Bold); My other buttons (italic, underline) have identical code except for the FontStyle.Bold part which is changed for the appropriate

A way to overcome RichTextBox's limitations?

强颜欢笑 提交于 2021-02-11 15:24:07
问题 I am developing an app using WinForms and the RichTextBox control. This control allows different changes to the RTF formatting using a property to change the font of the selected text. I have a button to toggle bold on the text: richTextBoxEditor.SelectionFont = new Font(richTextBoxEditor.SelectionFont, richTextBoxEditor.SelectionFont.Style ^ FontStyle.Bold); My other buttons (italic, underline) have identical code except for the FontStyle.Bold part which is changed for the appropriate

How to read .rtf file and convert into python3 strings and can be stored in python3 list?

谁说胖子不能爱 提交于 2021-02-08 10:18:15
问题 I am having a .rtf file and I want to read the file and store strings into list using python3 by using any package but it should be compatible with both Windows and Linux. I have tried striprtf but read_rtf is not working. from striprtf.striprtf import rtf_to_text from striprtf.striprtf import read_rtf rtf = read_rtf("file.rtf") text = rtf_to_text(rtf) print(text) But in this code, the error is: cannot import name 'read_rtf' Please can anyone suggest any way to get strings from .rtf file in

Read multiple *.rtf files in r

旧巷老猫 提交于 2021-02-08 06:39:07
问题 I have a folder with more than 2,000 rtf documents. I want to import them into r (preferable into a data frame that can be used in combination with the tidytext package). In addition, I need an additional column, adding the filename so that I can link the content of each rtf document to the filename (later, I will also have to extract information from the filename and save it into seperate columns of my data set). I came across a solution by Jens Leerssen that I tried to adapt to my

Read multiple *.rtf files in r

二次信任 提交于 2021-02-08 06:38:37
问题 I have a folder with more than 2,000 rtf documents. I want to import them into r (preferable into a data frame that can be used in combination with the tidytext package). In addition, I need an additional column, adding the filename so that I can link the content of each rtf document to the filename (later, I will also have to extract information from the filename and save it into seperate columns of my data set). I came across a solution by Jens Leerssen that I tried to adapt to my

Edit RTF file using Python

二次信任 提交于 2021-01-27 13:19:12
问题 Maybe this is a dumb question, but I don't get it so appologize :) I have an RTF document, and I want to change it. E.g. there is a table, I want to duplicate a row and change the text in the second row in my code in an object-oriented way. I think pyparsing should be the way to go, but I'm fiddling around for hours and don't get it. I'm providing no example code because it's all nonsense I think :/ Am I on the right path or is there a better approach? Anyone did something like that before?