Recommend this page to a friend! |
Classes of Christian Vigh | PHP RTF Tools | help/README.texter.md | Download |
|
DownloadRtfTexterThe RtfTexter abstract class allows you to extract text contents from an Rtf file, using one of the RtfStringTexter or RtfFileTexter derived classes. It has been designed to be of simple use ; instantiate an object, then use either the AsText() or SaveTo() methods to retrieve the text contents from an Rtf file or save them to an output file, respectively. Here is the version using Rtf contents available in a string :
And here is the file-based version :
Reference #The following paragraphs describe the methods and properties available in the RtfTexter classes. MethodsConstructorThe constructor of the RtfStringTexter class has the following signature :
while the RtfFileTexter version is :
The meaning of the parameters is the following :
Notes regarding page headers and footers : Since the RtfTexter class does not try to evaluate the current vertical position in a page, page headers and footers will only appear once per section, unless a \\page tag is encountered. AsText ( )The AsText() method returns text contents extracted from the underlying Rtf data. SaveTo ( $filename )Extracts text contents from the underlying Rtf data and saves them to the specified filename. PropertiesEolReturns the string used for end of lines when generating extracted text contents. OptionsGets/sets the text extraction options (see the $options parameter of the class constructor). PageWidthGets/sets the maximum number of columns to be used when the TEXTEROPT\_WRAP\_TEXT option has been specified. |