public final class RTFEmbeddedObject
extends Object
This class represents embedded object data contained within an RTF
document. According to the RTF specification, this data has been written using
the OLESaveToStream, although I have been unable to locate any existing
Java implementations of the equivalent OLELoadFromStream in order to
read this data, hence the current implementation.
To use this class with note fields in MPXJ, call
getNotesObject() to allow retrieval of the raw RTF
document and unformatted text from the note fields. If you want
to extract any embedded objects from the document, call the
RTFEmbeddedObject.getEmbeddedObjects() method, passing in the raw RTF
document.
The structure of data embedded in a notes field is beyond the scope
of the MPXJ documentation. However, generally speaking, you will find that
each item of embedded data will be made up of two RTFEmbeddedObject instances,
the first is a header usually containing string data, the second is the
actual payload data, which will typically be binary. You can retrieve the
String data using the RTFEmbeddedObject.getStringData() method, and the
binary data using the RTFEmbeddedObject.getData() method.
For each embedded item in the document you will typically find two
groups of these objects. The first group of two RTFEmbeddedObject instances
(one header object and one data object) represent either the location of a
linked document, or the binary data for the document itself. The second
group of two RTFEmbeddedObject instances contain a METAFILEPICT, which
either contains the icon image used as a placeholder for the embedded
document, or it contains an image of the document contents, again used
as a placeholder.
Warning: this functionality is experimental, please submit bugs for any
example files containing embedded objects which fail to parse when using this
class.