FAQ Database Discussion Community


Use RTF for Skype's mood text

c#,rtf,skype4com
I don't get any errors and the property actually changes my mood text (after allowing my app access to Skype), but it doesn't use RTF, it just sets my mood text to {\i Test} instead of Test. I already tried to create a FlowDocument and convert its content to RTF,...

Comparing Different File extension and Copying Files with PowerShell

powershell,pdf,copy,compare,rtf
Scenario: *.pdf in Folder1 *.rtf in Folder 2, both folders have the same file name but with different extensions. Need to Compare the two folders and copy over only the *.rtf that equal => from Folder2 to Folder3. Script: Compare-Object (Get-childitem $Folder1 -Recurse | foreach-object {$_.basename}) (Get-childitem $Folder2 -Recurse |...

RichTextBox control is only using first formatting

c#,.net,richtextbox,rtf,richtext
I am using Visual Studio 10, .NET Framework 4 and was creating a Rich Text Box Control for Text Input. I am formatting text ONLY by writing the *RichTextBox*.SelectionFont = new Font(currentFontFamily, currentFontSize, currentFontStyle); Method. When I am now accessing the Rtf formatted String via the RichTextBox.Rtf property, it works,...

NSRTFPboardType & paste into gmail browser window?

objective-c,cocoa,rtf,nspasteboard
I have a NSTextView which contains some text with attributes (syntax highlighting). I'm trying to have a copy option which keeps the syntax highlighting so that I can paste it into a gmail text window. Currently the highlighting does not appear when I copy paste it, however if I were...

NSAttributedString from RTF works only with iOS 8, not with iOS 7

ios,uitextview,rtf,nsattributedstring
I'm trying to load an RTF-File in a UITextView with the following Code: NSURL * filePath = [[NSBundle mainBundle] URLForResource:_fileName withExtension:@"rtf"]; NSAttributedString *stringWithRTFAttributes = [[NSAttributedString alloc] initWithFileURL:filePath options:@{NSDocumentTypeDocumentAttribute:NSRTFTextDocumentType} documentAttributes:nil error:nil]; myTextView.attributedText = stringWithRTFAttributes; With iOS 8 it works perfectly, but on iOS 7 it doesn't work, it only displays the...

Displaying Rich Text File in UITextView Causes Choppy/Slow Scrolling

ios,uitextview,rtf
Im currently loading a non-english (hebrew) Rich Text File into a UITextView like so. self.textView.attributedText = [NSAttributedString.alloc initWithFileURL:[ NSBundle.mainBundle URLForResource:@"TextFile" withExtension:@"rtf" ] options:nil documentAttributes:nil error:NULL ]; Everything get loaded correctly and the file scrolls, just it gets very choppy on the way down. I assume this is a rendering issue...

Save pictures in document using Powershell and Word 2013

html,image,powershell,rtf,word-2013
I'm trying to convert a HTML file with externally linked images to RTF using MS Word 2013 via Powershell commands, when using below command file gets converted however pictures are missing $wrd = New-Object -ComObject "Word.Application" $doc = $wrd.Documents.Open('c:\test.html') $opt = [ref][Microsoft.Office.Interop.Word.WdSaveFormat]::WdFormatRTF $name= [ref]'C:\test.rtf' $wrd.ActiveDocument.SaveAs($name, $opt) $wrd.ActiveDocument.Close() $wrd.Quit() If I...

Change SelectedRTF

c#,winforms,richtextbox,rtf
I have a richTextBox and a Regex with some words. Once, I find all the words I want to change their color to blue. I can use SelectionColor = Blue, but when it comes to coloring thousands of words it becomes quite slow. After some search, I read that changing...

How can i put several paragraphs in a cell in Rtf 1

table,rtf,paragraph
I can use a paragraph in a cell with this code: \trowd\cellx3000\pard\intbl\ltrpar\cf1\f0\fs24 aaaaa \cell\row But using 2 or more paragraphs is a problem for me. how can i do that?...

RichTextBox and special chars c#

c#,special-characters,richtextbox,rtf
I need to put text with RTF format in a richtextbox, I try to put it with the richtextbox.rtf = TextString parameter, but the problem is that the string has special chars and the richtextbox does not show all the string correctly. The String and code that I am using:...

RTFEditorKit read()/write() bug?

java,rtf,jtextpane
consider the following code: import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import javax.swing.JTextPane; import javax.swing.text.BadLocationException; import javax.swing.text.DefaultStyledDocument; import javax.swing.text.StyledDocument; import javax.swing.text.rtf.RTFEditorKit; public class TestRTF { public static void main(String args[]) throws BadLocationException, IOException { new TestRTF(); } public TestRTF() throws BadLocationException, IOException { StyledDocument doc = new...

How to modify RTF file with images from the code

delphi,rtf,delphi-xe7,trichedit
I have template of document in RTF format and it contains some text and some images (created with WordPad, Win 7). I need to change some text and save it. I am trying to do it like this (Delphi XE7, Win32 platform, Windows 7 x64 SP1): RichEdit1.Lines.LoadFromFile('1.rtf'); RichEdit1.Lines.SaveToFile('2.rtf'); So i...

How to convert RTF to Markdown on the UNIX/OSX command line similar to pandoc

osx,unix,converter,markdown,rtf
How do I convert RTF (say from stdin) to Markdown with a command line tool under UNIX/OSX. I am looking for something like pandoc. However pandoc itself does not allow RTF as an input format. :-( So, I'd be happy either with a similar tool to pandoc or a pointer...

vb.net copied rtf text not pasteable in notepad

vb.net,clipboard,copy-paste,rtf,plaintext
If I copy the SelectedRtfContent of an RTF box to the clipboard, the text isn't pasteable in a TextEditor like Notepad, only in a Rtf enabled one like WordPad. Dim strClpTxt As String = txtResultsAll.SelectedRtf Clipboard.SetText(strClpRtf, TextDataFormat.Rtf) --> Paste possible in WordPad, but not in Notepad. Dim strClpTxt As String...

How to add simple static RTF to a .NET RichTextBox in C++CLI

.net,c++-cli,rtf
I am having trouble adding some basic RTF text to a RichTextBox object I have in my .NET C++CLI Windows Forms application. All I need to do is fill my RTF box with two or three "paragraphs" of STATIC text with some text bold, some italic, and some regular and...

RTF to NSAttributedString with Tables (iOS)

ios,rtf,nsattributedstring
I'm using an RTF file as a template in an iOS App. A part of this is a couple tables; however, when doing the conversion from RTF to NSAttributedString, the tables are lost. If I sent them up as plain tabs, the formatting works. However, since most of the text...