[Tex/LaTex] Change page margins for one single page inside the document

koma-scriptlandscapemargins

I am writing a document , A4, using KOMA-Scripts (scrbook) and inside my document i have a Flowchart which doesn't pass in portrait. I used

 \KOMAoptions{paper=landscape}
 \recalctypearea
 \newgeometry{left=20mm,right=20mm,top=20mm, bottom=20mm}

and at the end of the Flowchart, for returning to portrait, i write

 \KOMAoptions{paper=portrait}
 \restoregeometry
 \recalctypearea

doing this give me what i want, but i get the following Warning:

Package typearea Warning: Bad type area settings!
(typearea)               The detected line width is about 48%
(typearea)               larger than the heuristically detected line width.
(typearea)               You should e.g. decrease DIV, increase fontsize
(typearea)               or change papersize.


Package typearea Warning: Typearea changed!
(typearea)                You should do this only at preamble, because only
(typearea)                \begin{document} calculates output dimensions!
(typearea)                Trying to calculate new output dimensions, but
(typearea)                this is only a dirty hack on input line 206.


Overfull \hbox (211.8935pt too wide) in paragraph at lines 314--315
 [] 
[4
Non-PDF special ignored!]

Package typearea Warning: Typearea changed!
(typearea)                You should do this only at preamble, because only
(typearea)                \begin{document} calculates output dimensions!
(typearea)                Trying to calculate new output dimensions, but
(typearea)                this is only a dirty hack on input line 321.

How could i solve this warning due to \recalctypearea?

Remark
I know that Overfull \hbox is ... is due to something else

Best Answer

You can't disable the warnings. This behaviour is based on the algorithm of typearea / \recalctyparea. \recalctypearea performs its calculations with the last page settings. But by using landscape, the changes to \textwidth and \textheight are more than 15%. (This is the allowed penalty). typearea ignores the modification of the page orientation. Maybe in the next release Markus Kohm will add such a feature.