Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync upstream #1

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d5f5653
Fix default Unicode alternate skip count
joniles Oct 2, 2015
d67da79
Added support for Cp1254.
joniles Jan 11, 2016
b50177a
Renamed RtfDumpListener, added RtfDump utility.
joniles Feb 2, 2016
26874e5
Added missing Greek encoding
joniles Feb 2, 2016
a3eb954
Added Korean encoding
joniles Feb 2, 2016
910dd52
Documentation updates
joniles Apr 18, 2016
073ab18
Update README.md
joniles Apr 18, 2016
e50d7e4
Update README.md
joniles Apr 18, 2016
ce5a41c
Update README.md
joniles Apr 18, 2016
c3ba2b9
Added support for mac encoding
joniles May 25, 2016
e1c70b2
Merge branch 'master' of ssh://git@github.com/joniles/rtfparserkit.git
joniles May 25, 2016
4becf02
Handle signed values.
joniles Jun 8, 2016
a2ab5fb
Add support for UTF-8 encoding.
joniles Jun 8, 2016
87c1892
Update symbol code page
joniles Jun 15, 2016
49da4bf
Add support for additional code pages
joniles Jan 5, 2017
823ca9a
Update README.md
joniles Jan 13, 2017
de42a30
Correctly handle default encoding.
joniles Feb 8, 2017
97c9f27
Update README.md
joniles Feb 8, 2017
98abe9a
Gracefully handle malformed hex bytes.
joniles Jun 14, 2018
12415ce
Build using Maven
joniles Nov 5, 2018
16c286a
Target Java 1.6
joniles Nov 8, 2018
d609b5c
Handle cpg command. Handle implicit use of font 0.
joniles Mar 29, 2020
9f175a8
Merge branch 'master' of ssh://github.com/joniles/rtfparserkit
joniles Mar 29, 2020
c5f98df
Record when the font has been set explicitly.
joniles Mar 31, 2020
5d6f909
Bump version
joniles Mar 31, 2020
a3ae640
Update JUnit version
joniles Feb 10, 2021
3119eef
Use MS932 to support NEC special characters
joniles Feb 10, 2021
cd420e7
Update to 1.16.0
joniles Feb 10, 2021
5dbd607
Add IDEA project
joniles Apr 21, 2022
2f015b9
Add FUNDING.yml
joniles Apr 21, 2022
4f76c66
Add image dump example
joniles Oct 20, 2022
26c80c8
Tidy up example
joniles Oct 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Documentation updates
joniles committed Apr 18, 2016
commit 910dd5282aff8c1f2edc8608527162c1da7b0745
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -10,13 +10,18 @@ What's currently included?
* Raw RTF Parser - parses RTF, sends events representing content to a listener. Performs minimal processing - you get the RTF commands and data exactly as they appear in the file.
* Standard RTF Parser - parses RTF, sends events representing content to a listener. Handles character encoding, Unicode and so on, so you don't have to. This is probably the parser you want to use.
* Text Converter - demonstrates very simple text extraction from an RTF file
* RTF Dump - another demonstration, this time writing the RTF file contents as XML

What's planned?
---------------
* HTML converter
* Parsing to an RTF document object model
* RTF generation from an RTF document object model
Getting Started
===============

That's a lot of stuff!
----------------------
Yes it is! It'll take me a while to work my way through the list of things I want to achieve, so I'd love for you to send me some code which extends what I've done or makes it better!
You have a choice of two parsers to work with, the standard parser and the raw parser. The raw parser carries out minimal processing on the RTF, the standard parser handles character encodings, and translates commands which represent special characters into their Unicode equivalents. Most people will want to use the standard parser.

The parser is invoked something like this:
```java
InputStream is = new FileInputStream("/path/to/my/file.rtf");
IRtfSource source = new RtfStreamSource(is)
IRtfParser parser = new StandardRtfParser();
MyRtfListener listener = new MyRtfListener();
parser.parse(source, listener);
```