/    Sign up×
Community /Pin to ProfileBookmark

How do you add a page feed to HTML output?

I have generated a long report which displays via HTML. The users want to print the report (using regular browser printing function). They also want the printed report to start a new page at certain locations.

I haven’t the faintest idea how to force a page feed on an HTML page (truthfully, I haven’t any idea how to force a page feed from anywhere). Please tell me how.

Thanks in advance.
-Jeff

to post a comment
HTML

8 Comments(s)

Copy linkTweet thisAlerts:
@CharlesAug 22.2005 — See http://www.w3.org/TR/CSS2/page.html , though, PDF might be a better option here.
Copy linkTweet thisAlerts:
@JSchwarzauthorAug 23.2005 — Thanks, Charles. Good info, except for one thing: I don't know how to use this.

Here's what I've tried:

[CODE]<style type='text/css'>
.new {page-break-before}
</style>

<span class="new"> Title1 </span>
print out lots of info...
<span class="new"> Title2 </span>
Etc.[/CODE]

What am I doing wrong?

Thanks,

-Jeff
Copy linkTweet thisAlerts:
@CharlesAug 24.2005 — 
What am I doing wrong?

Thanks,

-Jeff[/QUOTE]
Using MSIE, perhaps.
Copy linkTweet thisAlerts:
@jabezAug 24.2005 — You need to give some values to the page-*-* properties.

The page-*-* properties are:

page:

page-break-after:

page-break-before:

values for page-break-before and page-break-after properties are:

always

avoid

auto

left

right

Eg.

<style type='text/css'>

.new {

page-break-before: value

page: value

page-break-after: value

page-break-before: value

page-break-after: value

}

</style>

Depending on what you are trying to do, something like this might work:

<style type='text/css'>

.new {

page-break-before: avoid

}

</style>

<span class="new"> Title1 </span>

print out lots of info...

<span class="new"> Title2 </span>

Etc.
Copy linkTweet thisAlerts:
@tikshnAug 24.2005 — i want to know my url
Copy linkTweet thisAlerts:
@jabezAug 24.2005 — Sorry, but I do not quite understand you question.

Could you be more specific please?
Copy linkTweet thisAlerts:
@jabezAug 24.2005 — This link will take you right to the section you need more info for Jeff.

http://www.w3.org/TR/CSS2/page.html#propdef-page-break-before
Copy linkTweet thisAlerts:
@JSchwarzauthorAug 24.2005 — Silly me. Of course it needs a value.

Thanks.

-Jeff
×

Success!

Help @JSchwarz spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...