Forum


Replies: 6   Views: 3196
Replacevariablebyhtml not converting heading tags
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 therasim  · 24-11-2015 - 04:29

I'm creating dyanmic content and on it I have H3/h4 heading tags, but once I run the replaceVariableByHTML they are not converted properly; they just appear bolded. What can I do to process them, since the entire generation of the document is based on a template and those are elements coming from a database?

Posted by admin  · 24-11-2015 - 09:16

Hello,

If you need to set custom styles to that tags you can associate Word styles through the parameter wordStyles.

Regards.

Posted by therasim  · 01-12-2015 - 14:55

I've tried this as well but no success at all; I don't know what is causing this

Posted by therasim  · 01-12-2015 - 14:57

What concerns me is that when I create the TOC those headings are not being displayed, and when I check if they got converted as headings, they appear as bolded paragraphs

Posted by admin  · 02-12-2015 - 10:13

Hello,

When you use Word, the default TOC shows only from 1 to 3 levels of the heading. If you add a custom TOC you can set how many values must appear in it, for example up to 5.

We have tested it and it's working perfectly.

Regards.

Posted by therasim  · 08-12-2015 - 03:27

I understand; although if I have the HTML with H3 and use it with that method, it's not being rendered as a heading, but as a paragraph bolded

Posted by admin  · 08-12-2015 - 07:44

Hello,

In Word headings are just paragraphs where you can set any styles you need.

Regards.