Public Method Details |
capable |
|
public bool capable( string $functionName )
|
| |
Tells whether we can do a conversion or not.
|
| Parameter |
|
| string |
$functionName |
|
|
not case sensitive. |
|
| Returns |
bool true if we can, false if not
@throw NULL on an unknown $functionName |
|
&htmlToText |
|
public string &htmlToText( string $htmlString )
|
| |
Convert Html => Text
at first it stripps all tags, then converts html entities back to orig values.problems occur if the html is bad, for example if closing tags are missing.
|
| Parameter |
|
|
| Returns |
string without html (and php etc) tags. |
|
&wordToText |
|
public mixed &wordToText( string $from )
|
| |
converts a word document to plain text.
converted format may be saved to file or returned.
|
| Parameter |
|
| string |
$from |
|
|
the path and filename to the original word doc. |
|
| Returns |
mixed (bool TRUE if output is saved to file, string otherwise) |
| Throws |
bs_exception (with custom error text that we can't control cause it comes from the shell.) |
|
&wordToHtml |
|
public mixed &wordToHtml( string $from )
|
| |
converts a word document to html.
converted format may be saved to file or returned.
|
| Parameter |
|
| string |
$from |
|
|
the path and filename to the original word doc. |
|
| Returns |
mixed (bool TRUE if output is saved to file, string otherwise) |
| Throws |
bs_exception (with custom error text that we can't control cause it comes from the shell.) |
|
&wordToWml |
|
public mixed &wordToWml( string $from )
|
| |
converts a word document to wml.
converted format may be saved to file or returned.
|
| Parameter |
|
| string |
$from |
|
|
the path and filename to the original word doc. |
|
| Returns |
mixed (bool TRUE if output is saved to file, string otherwise) |
| Throws |
bs_exception (with custom error text that we can't control cause it comes from the shell.) |
|
&wordToLatex |
|
public mixed &wordToLatex( string $from, [ string $to, string $clean ] )
|
| |
converts a word document to latex.
converted format may be saved to file or returned.clean parameter:there are 2 xml definition files, wvLaTeX.xml and wvCleanLaTeX.xml. i don'tknow what the difference is, what it means, but i guess the not-clean oneis recommended because of the naming (it's not latex and latexDirty).
|
| Parameter |
|
| string |
$from |
|
|
the path and filename to the original word doc. |
|
|
| string |
$to |
= >>NULL,<< |
|
the path and filename to the newly created file. if set to NULL then the converted format will be returned as string. |
|
|
| string |
$clean |
= >>FALSE<< |
|
default is FALSE, see above |
|
| Returns |
mixed (bool TRUE if output is saved to file, string otherwise) |
| Throws |
bs_exception (with custom error text that we can't control cause it comes from the shell.) |
|
&wordToAbi |
|
public mixed &wordToAbi( string $from )
|
| |
converts a word document to abiword.
converted format may be saved to file or returned.
|
| Parameter |
|
| string |
$from |
|
|
the path and filename to the original word doc. |
|
| Returns |
mixed (bool TRUE if output is saved to file, string otherwise) |
| Throws |
bs_exception (with custom error text that we can't control cause it comes from the shell.) |
|
wordSummary |
|
public array wordSummary( string $filePath )
|
| |
returns information about the given word document.
it looks like word6 documents don't work.i've read that the wordcount is wrong. what you can do is wordToText and then countthe words yourself, for example using the unix standard utility wc (wordcount) whichtells chars, words and lines.return value; hash with these keys:title, subject, author, keywords, comments, template, lastAuthor, rev (=reference number),appName (application), pageCount, wordCount, charCount, security, codepage.
|
| Parameter |
|
| string |
$filePath |
|
|
the path and filename to the word doc. |
|
| Returns |
array (hash, see above.) |
| Throws |
FALSE |
|
wordVersion |
|
public array wordVersion( string $filePath )
|
| |
returns information about the word version.
return value; hash with these 2 keys:'version' => (string)['word6', ...]'encrypted' => (bool)[TRUE|FALSE]note: wordxp identifies itself as word8 (word2000 is older and is word9 ...).
|
| Parameter |
|
| string |
$filePath |
|
|
the path and filename to the word doc. |
|
| Returns |
array (hash, see above.) |
| Throws |
FALSE |
|
Bs_FileConverter |
|
public void Bs_FileConverter( )
|
| |
Warning: documentation is missing.
|
| Returns |
void |
|