lot of space in generated PDF

View: New views
1 Messages — Rating Filter:   Alert me  

lot of space in generated PDF

by developer23 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.
LightInTheBox - Buy quality products at wholesale price