- OptionDetails :
object
- UnRTFAcceptedOptions :
Record.<string, OptionDetails>
- UnRTFOptions
Kind: global class
- UnRTF
- new UnRTF([binPath])
- instance
- .unrtfAcceptedOptions :
UnRTFAcceptedOptions
- .path ⇒
string
- .version ⇒
string
- .convert(file, [options]) ⇒
Promise.<string>
- .unrtfAcceptedOptions :
- static
- .UnRTF :
string
|undefined
- .UnRTF :
Param | Type | Description |
---|---|---|
[binPath] | string |
Path of UnRTF binary. If not provided, the constructor will attempt to find the binary in the PATH environment variable. For win32 , a binary is bundled with the package and will be used if a local installation is not found. |
unRTF.unrtfAcceptedOptions : UnRTFAcceptedOptions
Kind: instance property of UnRTF
Returns the path of the UnRTF binary.
Kind: instance property of UnRTF
Returns: string
- Path of UnRTF binary.
Returns the version of the UnRTF binary.
Kind: instance property of UnRTF
Returns: string
- Version of UnRTF binary.
Converts an RTF file to HTML/LaTeX/RTF/TXT.
Defaults to HTML output if no output*
options are provided.
UnRTF will use the directory of the original file to store embedded pictures.
Kind: instance method of UnRTF
Returns: Promise.<string>
- A promise that resolves with a stdout string, or rejects with an Error
object.
Author: Frazer Smith
Param | Type | Description |
---|---|---|
file | string |
Filepath of the RTF file to read. |
[options] | UnRTFOptions |
Options to pass to UnRTF binary. |
Kind: static property of UnRTF
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
arg | string |
The argument to pass to the binary. |
type | 'boolean' | 'number' | 'string' |
The type of the option. |
minVersion | string |
The minimum version of the binary that supports this option. |
[maxVersion] | string |
The maximum version of the binary that supports this option (optional). |
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
[noPictures] | boolean |
Disable the automatic storing of embedded pictures to the current working directory. |
[noRemap] | boolean |
Disable charset conversion (only works for 8-bit charsets) (UnRTF v0.20.5 or later only). |
[outputHtml] | boolean |
Generate HTML output. |
[outputLatex] | boolean |
Generate LaTeX output. |
[outputPs] | boolean |
Generate PostScript (PS) output (UnRTF v0.19.4 or earlier only). |
[outputRtf] | boolean |
Generate RTF output. (UnRTF v0.21.3 or later only). |
[outputText] | boolean |
Generate ASCII text output. |
[outputVt] | boolean |
Generate text output with VT100 escape codes. |
[outputWpml] | boolean |
Generate WPML output (UnRTF v0.19.4 or earlier only). |
[printVersionInfo] | boolean |
Print copyright and version info. |
[quiet] | boolean |
Do not print any leading comments in output (UnRTF v0.21.3 or later only). |