Forum


Replies: 8   Views: 4237
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

*push*

Hi @ all!
First of all I'd like to say that PHPDOCX is a great piece of software. But I also have got some trouble with the mapping of HTML elements to Word Styles.

I use something like this

[code]
$oPHPDocX->replaceTemplateVariableByHTML(
$sPlaceholder,
'block',
$sContent,
array(
'isFile' => false,
'parseDivsAsPs' => true,
'downloadImages' => true,
'wordStyles' => array(
'<p>' => 'Standard',
'<h1>' => 'Titel',
'<h2>' => 'Überschrift 1',
'<li>' => 'Listeneintrag 1'
)
)
);
[/code]

But in the resulting DOCX the headings [b]<h1>[/b] and [b]<h2>[/b] as well as list items [b]<li>[/b] have the style [b]Standard[/b].

I've already updated to v3.2.