I have a visualforce page which has a nested list structure. Sample code below.
Visualforce page
<apex:page controller="RoleStructure" showHeader="false" >
<html>
<apex:form >
<ul>
<li>Node 1</li>
<li>Node 2</li>
<ul>
<li>Node 2.1</li>
<ul>
<li>Node 2.1.1</li>
<ul>
Node 2.1.1.1
</ul>
<li>Node 2.1.2</li>
</ul>
<li>Node 2.2</li>
<ul>
<li>Node 2.2.1</li>
<ul>
Node 2.2.1.1
</ul>
<li>Node 2.2.2</li>
</ul>
</ul>
</ul>
</apex:form>
</html>
</apex:page>
As a normal VF page it will follow the default List styles (below)
- Node 1
- Node 2
- Node 2.1
- Node 2.1.1
- Node 2.1.2
- Node 2.2
- Node 2.2.1
- Node 2.2.2
-
Node 2.1.1.1
-
Node 2.2.1.1
But when I render the VF page as PDF, the list structure is not properly formatted (Below).
- Node 1
- Node 2
- Node 2.1
- Node 2.1.1 Node 2.1.1.1
- Node 2.1.2
- Node 2.2
- Node 2.2.1 Node 2.2.1.1
- Node 2.2.2
Not sure if this is a limitation of the the VF PDF rendering but is there any workaround ?