PmWiki /
HardPageBreak
Testing a hard page break.
This only works in print-mode, use this link: HardPageBreak?action=print
There should be a page break after this sentence.
This sentence should be on a new page.
Date: Wed, 19 Oct 2005 13:32:19 -0500 From: Chris Cox <ccox@airmail.net> Newsgroups: gmane.comp.web.wiki.pmwiki.user Subject: Re: hard page break in print view Russ Fink wrote: > Hello, > > What are my options for causing a hard page break in print view for > PmWiki 2? Unlike the breakpage recipe, I'm not interested in breaking > the page in the normal web view. What I want is the user to see all one > continuous page when viewing on the web, but when they go to print view, > I need them to have sections starting on a fresh page. > > This capability is known as "hard page" and "page break" to word > processing users. I think the page-break-after, page-break-before, etc. CSS items are CSSv2. But maybe they are used everywhere... I haven't tried. If so you could create an item with those attributes or use a div to get make it happen. You could turn it into your markup even. (:div style='page-break-after:always;':) (:divend:) To my knowledge there is no standard PmWiki markup that attempts to do this right now. I test the above just now and seemed to work on Firefox anyhow.
Date: Wed, 19 Oct 2005 14:10:53 -0500 From: Patrick R. Michaud <pmichaud@pobox.com> Cc: pmwiki-users@pmichaud.com Newsgroups: gmane.comp.web.wiki.pmwiki.user Subject: Re: hard page break in print view On Wed, Oct 19, 2005 at 03:04:25PM -0400, Russ Fink wrote: > Thank you, that worked like a charm. I echo your sentiment, is there some > way to add this easily into a wiki markup, perhaps a style, (even a > cookbook recipe) so that I can say something like, > %hardpage% > or even > (:hardpage:) > ? Try: $WikiStyleCSS[] = 'page-break-before'; $WikiStyle['hardpage'] = array('page-break-before' => 'always', 'apply' => 'block'); Then you can use %hardpage% on any element to force a page break before it, as in !! %hardpage% Why PmWiki is the best package ever Pm
This page may have a more recent version on pmwiki.org: PmWiki:HardPageBreak, and a talk page: PmWiki:HardPageBreak-Talk.