[2581] | 1 | RTF TO HTML
|
---|
| 2 | -----------
|
---|
| 3 |
|
---|
| 4 | This is based on version 2.7.5 of rtftohtml, which was last modified in
|
---|
| 5 | November, 1994.
|
---|
| 6 | It contains the text:
|
---|
| 7 | ###
|
---|
| 8 | Initial Implementation by Chris Hector ([email protected])
|
---|
| 9 | (c) 1994 by Chris Hector
|
---|
| 10 | May be freely distributed.
|
---|
| 11 | This translator was based on rtfskel.
|
---|
| 12 | ###
|
---|
| 13 | The last known email address I can find for him is <[email protected]>.
|
---|
| 14 | I think that <[email protected]> might reach him, but I'm not sure.
|
---|
| 15 |
|
---|
| 16 |
|
---|
| 17 | Versions 3.0 of rtftohtml and up are released under a shareware license,
|
---|
| 18 | and available from http://www.logictran.com (although it now has a new
|
---|
| 19 | name). You can download a free binary version of the software for most
|
---|
| 20 | platforms from this site.
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 | rtftohtml is based on RTF Tools, which is (c) April 1994 by Paul DuBois
|
---|
| 26 | <[email protected]>
|
---|
| 27 |
|
---|
| 28 | RTF Tools has the notice:
|
---|
| 29 | ##
|
---|
| 30 | Distribution Availability
|
---|
| 31 | This software may be redistributed without restriction and used for any
|
---|
| 32 | purpose whatsoever.
|
---|
| 33 | ##
|
---|
| 34 |
|
---|
| 35 | The supplied version understands RTF version 1.2, while the
|
---|
| 36 | latest version of the specification is RTF 1.6 (May 1999).
|
---|
| 37 |
|
---|
| 38 | I have added some of the newer rtf codes that were preventing some files from
|
---|
| 39 | being parsed properly, but they are not acted on. Most of them do not
|
---|
| 40 | actually affect the content anyway. Depending on how the rtf was created,
|
---|
| 41 | there might be tags that cause us to trip up and fail. If you have
|
---|
| 42 | rtf files that Greenstone is not extracting text from, please send me
|
---|
| 43 | some email ([email protected]).
|
---|
| 44 |
|
---|
| 45 | Note - we extract but do not convert Windows Metafile Format (.wmf) images.
|
---|
| 46 | On unix systems, these can be converted with newer versions of ImageMagick
|
---|
| 47 | (ie "convert" version 4.2.9 or newer).
|
---|
| 48 | Also, libwmf (for unix and windows) is available for conversion at:
|
---|
| 49 | http://wvware.sourceforge.net/projects/libwmf.html
|
---|
| 50 | but we do not include it here due to its dependencies
|
---|
| 51 | (eg libttf for truetype fonts).
|
---|
| 52 |
|
---|
| 53 | Embedded images such as jpegs and pngs are extracted fine, though.
|
---|
| 54 |
|
---|
| 55 | John McPherson ([email protected])
|
---|
| 56 | June 2001.
|
---|
[35291] | 57 |
|
---|
| 58 | ====
|
---|
| 59 | When compiling with gcc v10, the following struct definition:
|
---|
| 60 |
|
---|
| 61 | struct SSStruct {
|
---|
| 62 | struct SDest SD;
|
---|
| 63 | int alloc;
|
---|
| 64 | int used;
|
---|
| 65 | struct SSData *data;
|
---|
| 66 | } PNSave, FNSave;
|
---|
| 67 |
|
---|
| 68 |
|
---|
| 69 | in:
|
---|
| 70 |
|
---|
| 71 | htmlout.h
|
---|
| 72 |
|
---|
| 73 | caused a multiply defined linking error.
|
---|
| 74 |
|
---|
| 75 | The syntax used in the header file seeks to defined the struct 'SSStruct'
|
---|
| 76 | and then introduce 2 global variables 'PNSave' and 'FNSave'. It was
|
---|
| 77 | reasoned that this style of declaring a struct and then declaring global
|
---|
| 78 | variables of this type has probably been deprecated, then then officially
|
---|
| 79 | discontinued (by gcc v10). Rather than spending time delving into what
|
---|
| 80 | is/isn't allowed in newer standards of C, the decision was made to
|
---|
| 81 | simply rewrite the code so the actual declaration of the global variables
|
---|
| 82 | was moved to htmlout.c
|
---|
| 83 |
|
---|
| 84 | David Bainbridge ([email protected])
|
---|
| 85 | August 2021
|
---|
| 86 | ====
|
---|
[37385] | 87 |
|
---|
| 88 |
|
---|
| 89 | For newer Macs, the command-line C compiler needs to have all external
|
---|
| 90 | functions defined. The following files failed to extern exit(), and
|
---|
| 91 | so we have had to add in #include <stdlib.h> to the following files:
|
---|
| 92 |
|
---|
| 93 |
|
---|
| 94 | rtftohtml_src/htmlout.c
|
---|
| 95 | rtftohtml_src/html-unix.c
|
---|
| 96 | rtftohtml_src/Libs/lib/mkrtf-ctrl.c
|
---|
| 97 |
|
---|
| 98 | David Bainbridge and Anupama Krishnan
|
---|
| 99 | March 2023
|
---|
| 100 | ====
|
---|
| 101 |
|
---|
| 102 |
|
---|