| 
<?php
/*
 * Author:     En3pY
 * Created on: 20/JUN/2010
 * File Name:  wordtest.php
 *
 * File description:
 * Proof concept of the class declaration and execution
 *
 */
 
 class report extends lib_word {
 public function buildWordDocument() {
 $this->start();
 $this->set_fileFormat( 'pdf' );
 
 $this->set_field( 'custom_field_1', 'Field value 1' );
 $this->set_field( 'custom_field_2', 'Another field value' );
 $this->set_field( 'custom_field_3', true );
 $this->set_field( 'custom_field_4', '12345/2010' );
 
 $this->finish();
 }
 }
 
 $wordObj = new report();
 
 $wordObj->set_template( 'template.docx' );
 $wordObj->set_output( 'prova-01.pdf' );
 
 $wordObj->buildWordDocument();
 
 ?>
 |