How can I set in CSS the space between the lines of lists when I create PDF with iText

289 views Asked by At

When I convert my HTML to PDF I got a fix space between the lines of the list. How can I modify this? I have thousands of HTML files, I need a general solution with XMLWorker and CSS files.

.myli {
  margin-top:     0pt;
  margin-bottom : 0pt;
  padding-bottom: 0pt;  
  padding-top:    0pt;  
}

.myul {
  margin-top:     0pt;
  margin-bottom : 0pt;
  padding-bottom: 0pt;  
  padding-top:    0pt;  
}

.myp {
  margin-top:     0pt;
  margin-bottom : 0pt;
  padding-bottom: 0pt;  
  padding-top:    0pt;  
}

If I set all the padding and margins I get this ugly result:

sample of result

You can see, the space between the lines are ok when it is a simple paragraph, but in case of Lists there is a fixed, default space.

0

There are 0 answers