I am generating PDF from html content. for this i have used HTMLWorker. The code is like this
ArrayList list=HTMLWorker.parseToList(new StringReader(sb.toString()),style);
for(int i=0;i<list.size();i++)
{
document.add((Element)list.get(i));
}
where document is object of Document.
My generated PDF is fine, the only problem is if the content is too much, lot of space comes in PDF. It is like 1 page with content, next page with only header and then all space, then again the next with content, in random order.
please help.