Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
require_once( dirname( MPLUS_CE ) . '/vendor/PHPWord/Template.php' );
class Mplus_PHPWord_Template extends PHPWord_Template
{
private $page_xml;
public function __construct( $strFilename ){
parent::__construct( $strFilename );
$this->page_xml = file_get_contents(dirname( MPLUS_CE ) . '/assets/page.txt');
}
public function add_page(){
$this->_documentXML = str_replace("<!--page-->", $this->page_xml, $this->_documentXML);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment