Hi Guys,<BR><BR>I really hope someone can help me out this time... Been trying to solve it for days...<BR><BR><BR>My company is dealing with testpapers. We dynamically generate the testpapers/questions from our sql database and transfer it to html, then finally generate the pdf file. But we are using .NET/ASP.NET for our platform.<BR><BR>Problem<BR>From my understanding, all the questions are retrieve dynamically in a table. Our problem is deciding where to put the page demarcation. We do know that we have to put it ourselves. We are trying to figure out how to know when half the question is on page n and the other half of the question is on page n+1 so that we can insert the page demarcation point.<BR>Pls note, each question is inside a html table. Therefore, it part of the question&#039;s table cross over from n page to the n+1 page, the whole table should be push to the n+1 page.<BR><BR>Solutions Tried<BR>1) We have tried this on our html code. But it did not break automatically. Each question is stored in individual html table. And if that particular table exceeded to n+1 page, this code should be about to push the entire question to n+1 page.<BR>CSS code : &#039;div style="page-break-before:auto;&#039; {INSERT QUESTION} &#039;/div&#039;<BR><BR>2) I also try calculating table/td height and image height. But if this values are not specifically set, the value is equal to &#039;undefined&#039;.<BR><BR><BR><BR><BR>Thank s in advance for any help. Any help will be greatly appreciated.<BR>Tommy<BR>tom@testpapers.com.sg