473,662 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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*******@nospa m.com
Nov 18 '05 #1
2 13834
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*******@nospa m.com
"Steven Cheng[MSFT]" <v-******@online.m icrosoft.com> wrote in message
news:Zc******** ******@cpmsftng xa06.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
2221
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 positioned divs' code fragment: <DIV class=card0 style="BORDER-BOTTOM: black thin solid; BORDER-LEFT: black thin solid; BORDER-RIGHT: black thin solid; BORDER-TOP: black thin solid; POSITION: absolute; LEFT: 3.75in; TOP: 0in">
1
785
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 dynamically displayed based on certain conditions. What I want to do, and I thought this would be pretty easy, is when printing, start each panels content on a new page. It is ok if the content spans multiple pages, just want to start it on a new...
1
4475
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 print to a certain point in the document and eject the page and continue printing on the next page. Is this possible? TIA
1
2551
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. part of the form that creates the report is the ability to select a specific department. it is when that happens, that i need 2 of the 3 parts of the report footer to be visible=false. now i've got that working but here's the real problem. ...
8
12769
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 to introduce a page break between each table when printing. I'm not sure what options I have available. I know there is some support in CSS but I'm no sure on the details or effectiveness. Thanks in advance...
3
5722
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 page. Is it somehow possible? Thanks, LuTHieR
16
8371
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 -- each block contains three rows. this table is destined for paper printing. i would like to tell the browser *not* to bust up my blocks. rather, i would like it to smartly insert a page break inbetween <tbody>s if the last one cannot be rendered...
1
2343
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 Windows Vista which is using IE7.0. The page is breaking in between a page. Is there anyone met such a problem? Is Anybody having solution for this issue? Thanks, Surya
7
11097
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
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8764
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5654
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.