Replies: 8   Views: 3767
Header styles in wordstyles in embedhtml
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by HalloWelt  · 11-04-2013 - 12:13

I've tried it, yes.

My code contains the following lines:
$oPHPDocX = new CreateDocx();
$oPHPDocX->addTemplate( $sUploadPath.'/template/Template.docx' );
$oPHPDocX->importStyles( $sUploadPath.'/template/Template.docx' );
foreach( $aPlaceholders as $sPlaceholder => $sHTMLContent ) {
'isFile' => false,
'parseDivsAsPs' => true,
'downloadImages' => true,
'wordStyles' =>array(
'<p>' => 'Standard',
'<h1>' => 'Titel',
'<h2>' => 'Überschrift 1',
'<li>' => 'Listeneintrag 1'

Do I have to use IDs for the wordStyles mapping? Or anything like this?