Rich Text Format RTF codec for iPhone - iphone

Anyone know of any library that will enable me to read/write RTF format files on the iPhone? NSAttributedString would be the way to go - but since that isn't available just yet :-(
Essentially I need to convert between simple text and RTF.

The RTF file format is pretty simple. So if you just need to generate RTF from simple plain text the you can just generate an RTF file by hand.
See http://en.wikipedia.org/wiki/Rich_Text_Format to start.

Related

Convert text from image into text file

I have an image and I want to convert it text file to use in word processing software. 1) Can it be done in any software. 2) Is it possible to write a program in Matlab or any other language that can convert it to text. The font is really poor in the image file.
You're talking about OCR where there are existing libraries that can be used for this. I suggest you take a look at Leadtools OCR. I used it in .NET environment and it can convert images to text.
Yes, it can be converted into text by using softwares like Microsoft OneNote or others. You can also write programmes for creating an OCR in most of the programming languages.

Displaying Rich Text (.rtf) in JavaFX

I have a .rtf file that I need to display within a JavaFX GUI.
My research indicates that the JavaFX TextFlow supports rich text through a tree of Node objects. However, I am at a loss on how to get my .rtf file represented as this tree of Nodes.
I feel like there should be an intuitive way to parse the .rtf file into the Node tree, but I just can't seem to find a way to do it!
Parsing RTF and Rendering in a TextFlow
You could parse the rtf and generate a TextFlow representation of it (similar as is done for this markdown editor for markdown markup). I believe this would be a difficult task for you (the RTF 1.9.1 specification is 277 pages long). Describing how to do this would be too long and complicated for a StackOverflow answer (even if I could describe it, which I probably could not).
Converting RTF to a format JavaFX can more easily render
I suggest using a converter (either offline or using an online service) to convert your RTF to another format before trying to render it in JavaFX. If you know the documents in advance you can pre-convert before shipping your application, if you don't then you will have to provide a real-time conversion facility with your application. I won't recommend a particular service, but you can google and do some research on RTF conversion to see if there is one that fits. As a target format you could choose PDF or HTML, or an image (e.g. PNG).
JavaFX will natively display:
Images using an ImageView.
HTML using a WebView.
A 3rd party library can be used to display PDF documents or other formats using JavaFX.

How do I automate converting PDF to HTML?

I work for a publisher and am trying to extract content from our fully laid out PDFs. I've tried pdftohtml, pdftotext, pdfminer, and other Python-based approaches to getting the content, as well as saving to Word, HTML, XML, etc. from the original Acrobat files.
I don't need just the text, I also need the text formatting. That's because, for example, I need all the blue text in the document.
When I save to HTML, Word, etc. from Acrobat, the resulting files contain screenshots of the pages, not the laid out text. When I extract text using different Python modules I get the text but lose the text formatting.
The only solution I've found is to manually copy and paste from the PDF into a word doc, then saving as HTML. I'm hoping to automate this.
Why does copying from Acrobat into Word achieve what I can't do by other means? Has anybody come across this problem before?
Maybe you can consider another method. The software (https://pdfapi.codeplex.com/) can convert pdf files to html directly via MVS. If you are able to use the MVS, i think the software i mentioned above is useful for you to convert the text in pdf files to html that can keep the format perfectly. Of course, it's just a referral, you can have a try.

docx - markup / markup - docx conversion

I have to store some documents in the docx format, but can't stand using msword: I would like to edit some kind of plain text markup, anything except stuff based on XML (I don't like that either) and convert from/to that to/from docx.
Are there any options for this?
EDIT: since people think this is not programming related, I'll extend my question. What libraries do you suggest for writing a complete tex-docx/docx-tex converter?
If you're talking .net, I'd check out the OpenXML toolkit first. There are lots of "libraries" on the internet to do this, but they all seem to just be thin wrappers around the OpenXML stuff.
You might also check out
http://openxmldeveloper.org/
Aspose.Words for .NET allows you to create DOCX files from scratch using text or other content and then convert DOCX files to text etc. It doesn't require MS Office to be installed on the system. And the component is a simple .NET assembly with an easy to learn and implement API. Please try and see if it helps in your scenario.
Disclosure: I work as developer evangelist at Aspose.
You can try the DocxEditorKit http://java-sl.com/docx_editor_kit.html
Set the editor kit to JEditorPane, add styled text and store the document in docx format.

how to read .rtf file from the FTP server?

I know how to read text file from the ftp server.I have used this logic for rtf file.But it gives wrong out put.Is it possible to read rtf file from the server?If possible then please help me.
You need software that understands the rtf file format. Microsoft Word does. Most plain text editors will not be able to show you the contents of a file in rtf format.
Google for rtf format
Added: didn't notice that you're on an iPhone platform. Google for "rtf iphone" and you'll see several choices including http://prmac.com/release-id-4180.htm