File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Control Printing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Control Printing" Watch "Control Printing" New topic

Control Printing

Pankaj Patel
Ranch Hand

Joined: Jul 13, 2006
Posts: 73

I am Pankaj Patel and i need your help to overcome this requirement/issue.

I am having one html page and once the page is loaded automatically window:print() is being called.

The html page has 3 section and i need to print every section on a new page. Every section is containing dynamic values, and because of which my page size is not exact fix. Sometime it may increase sometime decrease.

Is there anyway to find, like, this statement will be printed on which page? so that i can give some extra feeds and make it so that it get printed on a new line.

Pankaj Patel
Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2851

Hi Pankaj, please CarefullyChooseOneForum for your questions so that you get best response.

|Asking Good Questions|
Pankaj Patel
Ranch Hand

Joined: Jul 13, 2006
Posts: 73
OK. Next time will choose proper forum.

FYI All. I had found the solution for the issue using CSS.

Page 1


Page 2

I hope you have understood it.
Pankaj Patel
Ranch Hand

Joined: Jul 13, 2006
Posts: 73
<p/tr/td/tag style="page-break-after: always;" >[/code]
I agree. Here's the link:
subject: Control Printing
It's not a secret anymore!