By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,400 Members | 1,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,400 IT Pros & Developers. It's quick & easy.

How to separate a html text in order to print each part in individual pages?

P: n/a
Hello,
I am a novice/moderate html programmer and I wonder how to tell the
browser from which start point and to which end point in the text will
each page be printed.
In other words, I have a single html text that contains different
informations that are displayed alltogether in the same browser.
When I print this page, the browser should put each different subject
in a separate page and not having it all mixed up.
Is it possible? How should i do it?

Ps.: This text can't be divided in different html files, it is only one
html file.

Thanks in advance,
Marcel.

Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
<ma******@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hello,
I am a novice/moderate html programmer and I wonder how to tell the
browser from which start point and to which end point in the text will
each page be printed.
In other words, I have a single html text that contains different
informations that are displayed alltogether in the same browser.
When I print this page, the browser should put each different subject
in a separate page and not having it all mixed up.
Is it possible? How should i do it?

Ps.: This text can't be divided in different html files, it is only one
html file.


CSS might help you...:
http://www.w3schools.com/css/css_ref_print.asp

--
Dag.
Jul 23 '05 #2

P: n/a
ma******@yahoo.com wrote:
Hello,
I am a novice/moderate html programmer and I wonder how to tell the
browser from which start point and to which end point in the text will
each page be printed.
In other words, I have a single html text that contains different
informations that are displayed alltogether in the same browser.
When I print this page, the browser should put each different subject
in a separate page and not having it all mixed up.
Is it possible? How should i do it?

Ps.: This text can't be divided in different html files, it is only one
html file.

Thanks in advance,
Marcel.


To start with, this seems a peculiar goal; if it is desirable to render
separable parts of content "all mixed up" in one medium, why is it
desirable to separate parts of the same content in another?
The CSS media property is intended to permit one to 'render' a resource
differently in different media. Some combined use of media with other
CSS properties, such as class, might result in what you describe, but I
think that would--to put it nicely--extend the idea of rendering way
beyond what's intended by the standard. It would in any case be very
contrived.
I think the given html fails to achieve its objective. Re-consider
whether the content should be all mixed up in any medium.
Jul 23 '05 #3

P: n/a

ma******@yahoo.com wrote:
Hello,
I am a novice/moderate html programmer and I wonder how to tell the
browser from which start point and to which end point in the text will each page be printed.


@media print {
h1 {
page-break-before: always;
}
}

will put cause each <h1> heading to start a new page.

See http://www.w3.org/TR/CSS21/page.html for CSS properties for "paged
media".

You will need to investigate whether browsers actually implement these
properties.

--Phil.

Jul 23 '05 #4

P: n/a
ph*******@treefic.com wrote:
ma******@yahoo.com wrote:
Hello,
I am a novice/moderate html programmer and I wonder how to tell the
browser from which start point and to which end point in the text


will
each page be printed.

@media print {
h1 {
page-break-before: always;
}
}

will put cause each <h1> heading to start a new page.

See http://www.w3.org/TR/CSS21/page.html for CSS properties for "paged
media".

You will need to investigate whether browsers actually implement these
properties.


IE6 does; therefore, I'd suspect, without certainty, that newer,
full-featured browsers do.
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.