Ha! I do this in newlfm.  What I do is specify page dimensions in a register.  During shipout, after shipping out the old page, I bring the new dimensions in and substitute for the old.

I need to do this because, in newlfm, I set up letters.  Page One of the letter can have a top margin of 5 cm to accommodate a figure or special feature pertaining to a letterhead letter.  On Page Two, however, I don't want that large margin.  I want a smaller margin, specified in a different manner.

Here is my hacked output page, which is used within newlfm (L 4781-4862 of newlfm.ltx V 8.4)

\def\@outputpage{%
\def\ifta{0}%
\txa{npind:\npind}%
\showdim{New page - before shipout}%
\begingroup%           % the \endgroup is put in by \aftergroup
\let \protect \noexpand
\@resetactivechars
\global\let\@@if@newlist\if@newlist
\global\@newlistfalse
\@parboxrestore
\txa{topmargin:\the\topmargin}
\txa{Before shipout...}
\showdim{New page - immediately before shipout}
\shipout \vbox{%
\set@typeset@protect
\aftergroup \endgroup
\aftergroup \set@typeset@protect% correct? or just restore by ending the group
\if@specialpage
\global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
\fi
\if@twoside
\let\@themargin\oddsidemargin
\let\@thefoot\@evenfoot \let\@themargin\evensidemargin
\fi
\fi
\reset@font
\normalsize
\txa{Before normalsfcodes}
\normalsfcodes
\let\label\@gobble
\let\index\@gobble
\let\glossary\@gobble
\baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
\@begindvi
\vskip \topmargin
\moveright\@themargin \vbox {%
\vfil
\color@hbox
\normalcolor
\color@endbox
}%                        %% 22 Feb 87
\dp\@tempboxa \z@
\box\@tempboxa
\box\@outputbox
\baselineskip \footskip
\color@hbox
\normalcolor
\hb@xt@\textwidth{\@thefoot}%
\color@endbox
}%
}%
\txa{After shipout}
\global\let\if@newlist\@@if@newlist
\showdim{New page - before reset}
\if@dim@reset
\if@repth \global\textheight \@rep@th \global\@repthfalse \fi
\fi
\global \@colht \textheight
\stepcounter{page}%
\let\firstmark\botmark
\if@dim@reset
\if@repth \global\textheight \@rep@th     \global\@repthfalse \fi
\if@reptw \global\textwidth \@rep@tw      \global\@reptwfalse \fi
\if@repom \global\oddsidemargin \@rep@om  \global\@repomfalse \fi
\if@repem \global\evensidemargin \@rep@em \global\@repemfalse \fi
\if@repcs \global\columnsep \@rep@cs      \global\@repcsfalse \fi
\if@reptm \global\topmargin \@rep@tm      \global\@reptmfalse
\txa{Fixing tm} \fi
\if@repfs \global\footskip \@rep@fs       \global\@repfsfalse \fi
\fi
\showdim{New page - after reset}
\def\ifta{0}%
\renewcommand{\footrulewidth}{\the\@Frw}
}

In this code \txa is a conditional listing tool, showdim shows dimensions

\if@dim@reset - newif to reset dimensions
\if@repth - if replace textheight - new value is \@rep@th - reset if  to false

Some kind of protected mechanism is used to place values into \@rep@th

Paul Thompson
Div Biostatistics, Washington University, St. Louis

----- Original Message ----
Sent: Thursday, February 7, 2008 8:23:10 AM
Subject: Re: Internal and external page setup control

13 jan 2008 kl. 19.41 skrev Frank Mittelbach:
> I'm having a bit of trouble to find a good way to specify internal or

> external
> page setup control. In LaTeX2e this concept only exists in some
> rudimentary
> form, i.e., it is possible to influence that page style as far as
> running
> headings are concerned by placing a \pagestyle or \thispagestyle
> command in
> the source but that's about all that is available.
[snip]
> What I'm looking for for the new output routine is to be able to
> change, for
> example, the area specifications for the current or the following
> pages. The
> tricky part is: how should this be specified and when should it act?
>
> If it works like \thispagestyle, i.e., is intended to act on the
> "current"
> page then this might result in the following problem:
>
>     * Some such directive would be picked up when gathering material
> and would
>       change, say, which float areas are allowed on the current page.

> But then
>       adding floats to these areas the point with the directive might

> get
>       pushed out of the current page (since each float takes away
> space from
>       the galley). As a result all the placements done may no longer
be
>       valid.

Maybe a stupid question (however any reply might be better than no
reply), but would it help to use \marks for communicating this kind of
settings to the output routine?

Parts of what you've written seems to indicate there is the kind of
sensitivity to position in vertical material that marks would provide,
but OTOH grepping in xpackages/xor/ doesn't turn up anything to
indicate that marks are being used for anything but running head
contents and the like.

Lars Hellström