Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys..i want to set up a HTML content for print preview.
any idea's u hav :-)
currently i n using javascript code
as

Window.print();

but this wil distract my page content;i mean for eg:

consider that i have a page with 4 paragarah.
first 3 are ok but last 4th para got split in 2 pages.

RequireD is i want to display that 4th para in next page it self

thanx in advnace
Posted

Refer - CSS page-break-inside Property[^].
CSS
@media print {
    p {page-break-inside: avoid;}
}

Try this.
 
Share this answer
 
Hi,

thanx for reply,

but now i wil tel u my exact requirement.
Consider the below example.






===========Exampl ==================

This wil be in first page


Section A

1.
Item Label: SAMPLEQ_09_label_24
Write an essay about Trouble shooting concepts in Networks。

Answer: NA

2.
Item Label: SAMPLEQ_09_label_24
Write an essay about Trouble shooting concepts in Networks。

Answer:NA



3.

A) Research In Motion Ltd is changing its name to BlackBerry, the company announced, in move to refresh its tarnished image.
B) The announcement signals the company’s hopes for a streamlined identity.
C) The switch underscores the close attention the company is paying to marketing as it launches a product crucial to its survival.
D) In the past, it was roundly criticized for botching the launch of the Play Book tablet and other devices. This is for testing.

a)
A and C
b)
B,C and D
c)
A and B。
d)
B and D
Answer:
A and B。




4
Item Label: SAMPLEQ_01_label_24
A) Research In Motion Ltd is changing its name to BlackBerry, the company announced, in move to refresh its tarnished image.
B) The announcement signals the company’s hopes for a streamlined identity.
C) The switch underscores the close attention the company is paying to marketing as it launches a product crucial to its survival.
D) In the past, it was roundly criticized for botching the launch of the Play Book tablet and other devices. This is for testing.

a)
A and C
b)
B,C and D

//below option will display in next page.Which i don't want.
//this whole question i want to display in next page if possible or only Option(s)in the next page. This all in runtime


c)
A and B。
d)
B and D

Answer:
A and B。
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900