aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes page-break-after: always causing vertical alignment problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "page-break-after: always causing vertical alignment problem" Watch "page-break-after: always causing vertical alignment problem" New topic
Author

page-break-after: always causing vertical alignment problem

Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Hi All, I have added the following code to my HTML :

As shown in several posts I have seen on JavaRanch in order to make my reports contain a page break. The problem I am seeing is that when I have more than one page with page breaks in between, for some reason the pages start rendering about half way down the actual printed page. The breaks do occur as desired, but I am not sure why this would cause the page to no longer start printing at the top of the paper.
Has anyone else experienced this?
Thanks,
Kim
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Read the posts here: http://www.experts-exchange.com/Web/Web_Languages/CSS/Q_20876141.html
Explains the problems that this method has and solutions...
Eric
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Thank you so much Eric. That was a HUGE help. I spent hours yesterday searching the web for just such an article.
What I learned from it has helped my "friendly" report output print better. It also helped me to learn that printing from HTML is not an exact science, that quirkey things can happen depending on the browser and/or the printer, so I won't kill myself to try to get it perfect.
In case anyone is following this thread, the biggest problem I had was that my reports were in tables, and all the tables were contained in one outer table for formatting purposes. So, even though I was putting the page break between the report tables, the break was still within an outer table. Once I removed the outer table, the formatting improved dramatically.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: page-break-after: always causing vertical alignment problem