Replies: 9   Views: 1266
Embedhtml, list styles and item depth
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 Simon87  · 21-01-2020 - 11:04


We need 3 levels of numbering and have our document genereted via embedHTML. We apply custom style via class name added to html tags. What attribute will tell generator which numbering level to use? We tried "depth" and "data-depth", didn't help.

Main code sample:

Posted by admin  · 21-01-2020 - 12:30


depth/data-depth attributes aren't supported. We recommend you to apply other custom style.

We move the request to the dev team to add support.


Posted by Simon87  · 21-01-2020 - 12:49

Which custom style can we use? 

Posted by admin  · 21-01-2020 - 13:04


You can create and use a custom list style ( with the options that suit your needs and apply it to a paragraph or a custom paragraph from HTML or using addText.

Instead of applying the third level of a custom level list, that phpdocx doesn't allow to apply as first element of the content based on the depth, you could generate a custom list style that the first level has the required properties and then apply it to the paragraph or HTML or custom paragraph style.


Posted by Simon87  · 21-01-2020 - 14:19

Yep, we do this way. But when after document is generated when someone changes number on first level of our lists changes do not touch second level of sublist. When will you patch phpdocx with this feature and will this patch be available for me on current licence?

Posted by admin  · 21-01-2020 - 14:41


We have moved the request to the dev team and it has been added to the task list to be done, but it doesn't have a release date yet. First if needed to be checked by the dev team.

Please note that new features are only added to new versions, so phpdocx 9.5 won't include that feature but another future release. New versions can be downloaded if the license includes LUS [] (LUS licenses can also get beta patches and beta changes) or after doing an upgrade when a new version has been launched. Your license doesn't have LUS included, we recommend you to get it on MY PHPDOCX page after login.


Posted by Simon87  · 21-01-2020 - 15:05

That's a bad situation. We saw that there is a depth-feature for lists in your engine, consulted with you, but we don't get it in html mode thus having not full functionality. And you tell me to pay once more although we found this glitch. Are you sure that's a reasonable client-oriented decision? :)

Posted by admin  · 21-01-2020 - 15:12


Applying a custom depth of a custom list style to a paragraph has never been supported. This is not an error but a feature not available yet. It will be available in a future release of the library.


Posted by admin  · 21-01-2020 - 15:20


The page you link is from XMLAPI and the XML content:

<pdx:data pdx:type="list">
    <pdx:item pdx:depth="1">item 1</pdx:item>
    <pdx:item pdx:depth="2">subitem 1.1</pdx:item>
    <pdx:item pdx:depth="2">subitem 1.2</pdx:item>
    <pdx:item pdx:depth="2">subitem 1.3</pdx:item>
    <pdx:item pdx:depth="1">item 2</pdx:item>

allows generating a list from XML using XMLAPI (, not to set a custom depth style from a custom list style to a paragraph. pdx:depth sets the level of the list content, not a custom style.