Posts Tagged ‘Parsing’

VN:F [1.8.0_1031]
Rating: 0.0/10 (0 votes cast)

I was wondering, can you dynamically edit a word document on the fly? Well no, not a word document, but you can edit an open office document this way. So, I wrote this class to accomplish this task for me.

Edit open office documents on the fly with a webform. This class is GPL and free. The class comes with examples of the classes usage. This script will edit and ODT Open Office document on the fly, just specify what you want to replace and cha-ching its done.

/*
* example.php
* this is an example file to show how the workings of the docParse class works.
* read the comments in the class to know what params or switches are needed to do what.
* some of the basics have been explained below.
*/
include 'class.docParser.php';
$doc = new docParser;
$doc->init('tmp', $tempfolder, $tempfile);
$doc->breakDoc($tempfolder, 'example.doc');
$doc->searchAndReplace($tempfile, ':foo:', 'Do The Dew');
$doc->buildDoc($tempfolder, 'seeitworks.doc', true, true);

Download docParser.zip (12 downloads)

Post to Twitter Post to Digg Post to Facebook Post to Ping.fm Post to StumbleUpon

Onys VSpy Plugin