Stupi / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

margin-bottom at the end of a page leads to a page break #194

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add a margin-bottom to a div at the end of a document. The value must be 
greater than the available height of the page.
2. Convert the XHTML to PDF.

What is the expected output? What do you see instead?
The resulting document will have a blank page at the end because the margin 
where the page break occurs has not been set to 0.
The blank page should not be created. Reason:
"In the normal flow, page breaks may occur at the following places:
  1. In the vertical margin between block boxes (or rows in a table). When a page break occurs here, the computed values of the relevant 'margin-top' and 'margin-bottom' properties are set to '0'.
  [...]"
(http://www.w3.org/TR/css3-page/#allowed-pg-brk)

What version of the product are you using? On what operating system?
Latest version of flying-saucer from GIT (master) from 2012-02-13, reproduced 
on Mac OS X 10.6 and CentOS.

I attached a test case (source XHTML file with the resulting PDF document).

If there is no time to fix it, it would be nice if you could give me a hint 
where to start.

Original issue reported on code.google.com by christia...@googlemail.com on 20 Apr 2012 at 3:21

Attachments: