Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ijzerenhein/rtftohtml
Parse RTF and write output as an HTML file (written specifically for InDesign generated RTF, but works for any source)
https://github.com/ijzerenhein/rtftohtml
converts-rtf html in-design indesign2html indesigntohtml parser rtf rtf2html rtftohtml
Last synced: about 1 month ago
JSON representation
Parse RTF and write output as an HTML file (written specifically for InDesign generated RTF, but works for any source)
- Host: GitHub
- URL: https://github.com/ijzerenhein/rtftohtml
- Owner: IjzerenHein
- License: mit
- Created: 2015-08-22T07:24:26.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-16T08:08:26.000Z (about 6 years ago)
- Last Synced: 2024-10-13T18:02:23.599Z (about 1 month ago)
- Topics: converts-rtf, html, in-design, indesign2html, indesigntohtml, parser, rtf, rtf2html, rtftohtml
- Language: JavaScript
- Homepage:
- Size: 31.3 KB
- Stars: 22
- Watchers: 5
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rtfToHtml
Converts RTF files into HTML.
This tool has been developed to convert RTF output from Adobe InDesign into
(almost) pixel perfect formatted HTML output.It supports the following features:
- newline (/par)
- tabs (/tab)
- right-aligned tabs (/tqr)
- tab-stops (/tx)
- left-indent (/li)
- colors (/colortbl, /red, /blue, /green, /cf)
- font-names (/fonttbl)
- font-size (/fs)
- bold (/b)
- italic (/i)
- text-alignment (/gl, /gc, /gr)
- paper size (/paperw, /paperh)
- margins (/margl, /margr, /margt, /margb)The program itself consists of two parts:
- A parser (converts RTF into a JSON data-structure)
- A formatter (currently only HTML output is supported)Both can be easily extended to add new features and handling of additional RTF control codes.
## Command line options
```
Usage: rtfToHtml [options] rtfFile htmlFileOptions:
-h, --help output usage information
-V, --version output the version number
-m, --margins [top,right,left,bottom] Override margins (twips)
-w, --width [width] Override paperwidth (twips)
-h, --height [height] Override paperheight (twips)
-va, --vertalign [align] "top", "center", "bottom"
```## Contribute
If you like this project and want to support it, show some love
and give it a star.© 2015 Hein Rutjes