pdfmake
pdfmake copied to clipboard
Nested Ordered Lists
Given the following dd
// playground requires you to assign document definition to a variable called dd
var dd = {
"content": [
{
"ol": [
{
"text": "ordere list one"
},
{
"ol": [
{
"text": "nested"
},
{
"text": "nested again"
},
{
"ol": [
{
"text": "double nested"
}
]
}
]
},
{
"text": "ordered list two"
}
]
}
]
}
Produces the following numbering
Is this expected? Is my dd incorrect in some way?
I still have yet to figure this out. I am unable to find any solution. Any thoughts?
any updates on this?
You can wrap a list item and the subsequent nested list in an array:
var dd = {
"content": [
{
"ol": [
[
{
"text": "ordere list one"
},
{
"ol": [
{
"text": "nested"
},
[
{
"text": "nested again"
},
{
"ol": [
{
"text": "double nested"
}
]
}
]
]
}
],
{
"text": "ordered list two"
}
]
}
]
}
Fixed by PR https://github.com/bpampuch/pdfmake/pull/2760. Released in version 0.2.11.