OpenDocument
[ class tree: OpenDocument ] [ index: OpenDocument ] [ all elements ]

Source for file read.php

Documentation is available at read.php

  1. <?php
  2. require_once 'OpenDocument.php'// open document class
  3.  
  4. //open test.odt
  5. $odt OpenDocument::open('test.odt');
  6.  
  7. //loop throught document children
  8. foreach ($odt->getChildren(as $child{
  9.     //strip headings
  10.     if ($child instanceof OpenDocument_Element_Heading{
  11.         $child->delete();
  12.     }
  13. }
  14.  
  15. //save as no_headings.pdt
  16. $odt->save('no_headings.odt');
  17. echo "saved as no-headings.odt\n";
  18. ?>

Documentation generated on Mon, 11 Mar 2019 15:51:01 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.