[Tex/LaTex] Change \textwidth after first page in scrlttr2

marginsscrlttr2

I am looking for an automated mechanism to change the effective \textwidth at the first pagebreak of a letter in scrpage2. I've tried \afterpage and \nextpage (ideally they would be set within \firsthead), both without success. I do not want to use the geometry package because firstly, IMO scrlttr2 should work with a change of KOMAoptions and friends and secondly, it does not seem to work anyways if used within scrlttr2 and the KOMA layout. Ideas and suggestions are very welcome.

Here's a MNWE. Page 2 and following should have a wider text block than the first page — but doesn't.

\documentclass{scrlttr2}%
\usepackage[english]{babel}
\usepackage{lipsum,afterpage}%
\setlength{\textwidth}{125mm}%
\nexthead{%
  \global\areaset{170mm}{\textheight}%
  \global\KOMAoptions{DIV=areaset}%
  \global\recalctypearea%
}
\afterpage{%
  \global\areaset{170mm}{\textheight}%
  \global\KOMAoptions{DIV=areaset}%
  \global\recalctypearea%
}
\begin{document}
\begin{letter}{Receipient}
  \opening{Dear receipient,}
  \lipsum[1-6]
  \closing{Yours}
\end{letter}
\end{document}

And BTW, I genuinely think that this is not covered by Change \textwidth and \textheight in mid-document and related questions and instead somehow relates to the internals of the KOMA classes.

Best Answer

Here is now a working example. It still requires a manual \pagebreak in the main text of the letter, but according to explanations by @DavidCarlisle, see above, this is at good as it can get without resorting to more powerful systems like luatex.

\documentclass{scrlttr2}%
\usepackage[english]{babel}
\usepackage{lipsum,afterpage}%
\setlength{\textwidth}{125mm}%
\firstfoot{%
  \afterpage{%
    \global\setlength{\textwidth}{17cm}%
    \global\setlength{\columnwidth}{\textwidth}%
    \global\setlength{\hsize}{\columnwidth}%
    \global\setlength{\linewidth}{\hsize}}%
}

\begin{document}
\begin{letter}{Receipient}
  \opening{Dear receipient,}
  \lipsum[1-2]
  \pagebreak % enfore the page break, otherwise afterpage will take
  % effect too late, i.e. after first broken paragraph on page 2.
  \lipsum[3-12]
  \closing{Yours}
\end{letter}
\end{document}

In this example the text body on the first page has a width of 12.5cm and on of 17cm on all following pages. If you want this to work in documents containing multiple letters, you should reset \textwidth on every "first page," e.g. using

\firsthead{%
    \global\setlength{\textwidth}{12.5cm}%
    \global\setlength{\columnwidth}{\textwidth}%
    \global\setlength{\hsize}{\columnwidth}%
    \global\setlength{\linewidth}{\hsize}%
}

in the preamble.