Support start attribute for ordered list
Brought to you by:
spipu
Hi!
Thank you for this convertor, I'm using it to automatically convert my CV and I left a link to your site from it's XHTML version.
I was missing support of start attribute for <ol>, which modifies number ordered list with decimal style starts from.
I include a small hacky patch that just solved my problem. Maybe someone will also need this.
Best regards,
Eugene Gilewski
Hacky patch with implementation
Your patch is incomplete, you also need to modify parsingCss.class.php :
After :
case 'list-style-image':
if ($nom=='list-style') $nom = 'list-style-type';
$this->value[$nom] = $val;
break;
Put :
case 'start':
$this->value[$nom] = $val;
break;
The default parameter for $start didn't work for me in PHP, so I had to add this code to html2pdf.class.php also (directly after // add the new level) :
if ($start <= 0)
$start = 1;
Note that this way the start attribute doesn't work like in the W3C specs, you have to use it as a style attribute, ie. :
<ol style="start:2;">
Unfortunately your change to html2pdf.class.php breaks my <ol start="0"> making it start from 1. Also neither with it nor without negative start numbers work. But I don't need that, be aware who do.