Location: PHPKode > scripts > PHP DocWriter > php-docwriter/examples/ex5.php
<?php
require_once('../lib/include.php');
import('phpdocwriter.pdw_document');
import('phpdocwriter.pdw_header');
import('phpdocwriter.pdw_footer');

$sxw = new pdw_document;
$sxw->SetLanguage('es','ES');
$sxw->SetStdFont ("Times New Roman",10);
$sxw->AddPageDef(array('name'=>'Standard','margins'=>'2,2,2,2'));

$head = new pdw_header($sxw,'Standard');
$head->Ln();
$head->Image(array('path'=>'logo.png','w'=>4.12,'h'=>1.92));
$head->Insert();

$foot = new pdw_footer($sxw,'Standard');
$foot->Ln();
$foot->AddLink ("PHP DocWriter","http://www.ciclope.info/~jmsanchez");
$foot->Insert();

$sxw->SetTitle ('Documento de prueba');
$sxw->SetAuthor ('José Manuel Sánchez');
$sxw->SetSubject ('Documento para probar el funcionamiento de phpdocwriter');
$sxw->SetKeyWords ('mysql,php,OpenOffice.org,phpdocwriter');
$sxw->Write ('Insertamos una cabecera y pie de página');

if (isset ($_REQUEST["format"]) && $_REQUEST["format"]!='') $sxw->SetExportFilter ($_REQUEST["format"]);
if (isset ($_REQUEST["zip"]) && ($_REQUEST["zip"] == 1)) $sxw->CompressOutput();
$sxw->Output();
?>
Return current item: PHP DocWriter