rtf

Removing fixed text width from an RTF file loaded into UITextView

微笑、不失礼 提交于 2019-12-12 04:37:44
问题 In my app I load the contents of an RTF file into a UITextView using this code: NSURL *url = [[NSBundle mainBundle] URLForResource:[fileName stringByDeletingPathExtension] withExtension:[fileName pathExtension]]; NSError *error; NSAttributedString *attributedString = [[NSAttributedString alloc] initWithFileURL:url options:@{NSDocumentTypeDocumentAttribute:NSRTFTextDocumentType} documentAttributes:nil error:&error]; [textView setAttributedText:attributedString]; The problem I am having is that

Yahoo YUI 2 - Rich Text Editor - can't get setEditorHTML method to work, what's wrong?

六眼飞鱼酱① 提交于 2019-12-12 04:29:13
问题 Today, for the first time, I came across the YUI 2 Rich Text Editor . (http://developer.yahoo.com/yui/editor/) I mainly use Java Server Pages for my websites. I want to be able to set the text in the textarea of the Editor to a previously submitted value. As an example, when a user submits the page, after having entered text in the Editor, that text may be saved in a database for future use. I would then call the value from the database, and set the Editor to display it at that point, so the

Any .Net utility to covert HTML to RTF while maintaining CSS?

落爺英雄遲暮 提交于 2019-12-12 04:05:26
问题 Is there any .Net utility out there that will convert HTML to RTF, which will also honour CSS styles? I've found a lot of tripe that will either strip all the styles away, or do a terrible job of presenting them. There are plenty of HTML to PDF converters out there that do a decent job. I'm surprised it's so difficult to find something to go HTML to RTF. Please don't reply if you represent sautinsoft. That product falls into the 'terrible' category. 回答1: One option is to load a webbrowser

RichTextBox.RTF return unicode format or ANSI format?

冷暖自知 提交于 2019-12-12 03:43:39
问题 Recently, i'm very confused about the RTF format. I check the RTF 1.6 spec from MSDN, which is native supported in .Net. RTF 1.6 will support Unicode by \uN, and for ANSI, RTF will support multiple byte language via codepage. If we use RichTextBox.RTF to retrieve the RTF format, which format will be returned? Unicode? or ANSI multiple byte? System language configuration depended? or anything else? 回答1: String is always Unicode in .NET. 回答2: solved.. That's because we disable RichTextBox

right to left with apache poi

亡梦爱人 提交于 2019-12-12 01:33:48
问题 i'm using apache poi to modify some existing rtf files and return a copy to the client in a web application the issu with me is when i try to replacesome text and insert another wich is in arabic instead. here my code : FileInputStream in = new FileInputStream(mypath); POIFSFileSystem fs = new POIFSFileSystem(in); HWPFDocument doc = new HWPFDocument(fs); Range r = doc.getRange(); r.replaceText("<matricule>"," "+agent.getMatriculeAgent()); r.replaceText("<cin>"," "+agent.getCin());

Save Winforms RichTextBox Data as HTML?

☆樱花仙子☆ 提交于 2019-12-11 20:01:59
问题 I have to convert an Access VBA app over to VB.NET and one of the text boxes (format set to RichText) on the VBA app accepts a straight paste from a Word document including its formatting and saves it to the Access database as HTML... The HTML is then read from the database and displayed as it was originally pasted when retrieved. The issue I have now is, I can use a web browser control to display the data properly from the database, but the RichTextBox gives an Invalid File Format error.

Unable to to decompress large blobs in python

我的未来我决定 提交于 2019-12-11 17:24:12
问题 I have been trying to use python to extract compressed blobs from Oracle and decompress them. But the bigger blobs do not get decompressed completely. I have tried using dataframes and files to store the blobs and then decompress them but it doesn't convert the bigger blobs. Can memory be the possible issue? What changes can I try out? I cannot share the blobs as its restricted data. And I dont have access to create test data. I am using the below decompression code from git for decompressing

insert image to RTF file using PHP

↘锁芯ラ 提交于 2019-12-11 17:00:14
问题 How can I insert an image to an RTF file. Inside the RTF file there is a placeholder text like {photo}. I want to place the image at this position using php. 回答1: I found an open source PHP library that allows insertion of images to PHP-generated RTF documents. It's called PHPRTF. Here's the sample code that inserts images: link 来源: https://stackoverflow.com/questions/1135485/insert-image-to-rtf-file-using-php

Outlook meetings and rich text format

ぃ、小莉子 提交于 2019-12-11 16:52:45
问题 I have been working on creating appointments from Powershell in Outlook. Everything seems to be working with the exception of being able to set the appointment.RTFBODY. It looks like it is stored as a byte array, but despite my best efforts and many attempts I have been unable to set it. Any suggestions would be much appreciated. http://pastebin.com/kQvGfNRS Edit: I was able to find what could be a similar issue. https://social.msdn.microsoft.com/Forums/sqlserver/en-US/5dba0d12-94e8-47a5-b082

Embedded fonts in RTF

亡梦爱人 提交于 2019-12-11 16:51:58
问题 According to the rtf specs, we can embed a font in an rtf file using the \fontemb and \fontfile control words. Can someone give me a working example of that? I'd like the rtf file to use the font that's located in a separate file (i.e. .ttf file) 回答1: You should use TTEmbedFont function to create embedded font data. http://msdn.microsoft.com/en-us/library/windows/desktop/dd145145(v=vs.85).aspx Like this. //WRITEEMBEDPROC unsigned long WriteEmbedProc(void *lpvWriteStream, const void *lpvBuffer