473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Page break for printing

I have a page that I'm making for the sole purpose of printing and this page
makes 1.5 printed pages. Is there a way to force a print page break at a
specific place so when the user prints the page, it wont arbitrarily break
in the middle of a table or line of text?

Thanks.

--
mo*******@nospam.com
Nov 18 '05 #1
2 13801
Hi Moondaddy,

As for the adding a page break in a web page you mentioned, I've done some
research and find that there is a
" page-break-after" css property that we can use in web page. This property
can be used in html element and force the page to break when it is printed
out. For example:
<html>
<body>

This is the text for page #1.

<p style="page-break-before: always">

Page #2...

<p style="page-break-before: always">

Page #3...

</body>
</html>
For detailed description, you can view the following reference:

#The page-break-after property
http://www.w3schools.com/css/pr_print_pageba.asp

#How do I put page breaks in a web page
http://www.chami.com/tips/internet/052898I.html

#Notice that this css propety is not supported by all the browsers and it
recommended to be used as less as possible.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #2
Thanks thats great!

--
mo*******@nospam.com
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:Zc**************@cpmsftngxa06.phx.gbl...
Hi Moondaddy,

As for the adding a page break in a web page you mentioned, I've done some
research and find that there is a
" page-break-after" css property that we can use in web page. This property can be used in html element and force the page to break when it is printed
out. For example:
<html>
<body>

This is the text for page #1.

<p style="page-break-before: always">

Page #2...

<p style="page-break-before: always">

Page #3...

</body>
</html>
For detailed description, you can view the following reference:

#The page-break-after property
http://www.w3schools.com/css/pr_print_pageba.asp

#How do I put page breaks in a web page
http://www.chami.com/tips/internet/052898I.html

#Notice that this css propety is not supported by all the browsers and it
recommended to be used as less as possible.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: FxM | last post by:
I have two divs on my page basically two business cards. I would like to print one on each page. <div style="page-break-before: always"> works when is basic html but it's not working with my...
1
by: Scanner2001 | last post by:
I am trying to insert a printer page break inside of a form. I do not seem to be able to do this. My form contains 3 asp panels. Each of the panels have dynamically built content, and they are...
1
by: Danny Ni | last post by:
Hi, Is it possible to enter a page break in a HTML document, when a HTML document is diplayed in browser and user click print, the browser takes control of paging . I would like the browse to...
1
by: kaosyeti | last post by:
hey... i have a report that groups on salespeople. the report footer is a three part summary of the store's total data with 2 different departments for parts 1 and 2 and a store total for part 3. ...
8
by: CJM | last post by:
What is the best way to force a page break when printing from a browser? A page in my application generates a series of tables which are usually less than will fit on a page of A4. Ideally I want...
3
by: LuTHieR | last post by:
Hi, I have an HTML document and would like to split it in pages for printing. It consist basically of many tables, and I would like that when I print it the output will be one table per physical...
16
by: matt | last post by:
hello, ive been trying to figure something out, largely thru trial & error. thought perhaps someone else may have knowledge. i have an html table that consists of blocks of related data --...
1
by: =?Utf-8?B?U3VyeWEgUHJhYmhh?= | last post by:
I am using <div style =page-break-before:always</divfor page break while printing a layout designed using <table>, <tr>, <td>. It is working fine in IE 6.0. But this is not working properly in...
7
by: =?Utf-8?B?aXdlYg==?= | last post by:
Can we set page breaks in ASP Pages dynamically based on the data being populated? Akshay.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.