eeschema: Schematic does not print pages with different page orientation

Description

Schema with multiple pages; all pages are in Landscape orientation, except for one which is in Portrait (defined through menu "File->Page settings->Orientation").

Generating a print preview when in a landscape page, the page(s) having portrait orientation appear blank in the preview, and vice-versa.

When sent to the printer, all pages after the first blank one are also printed blank (even if they have the "correct" orientation).

KiCad Version

Application: Eeschema

Version: (5.99.0-8894-g4c1b4b4159), release build

Libraries:
	wxWidgets 3.0.5

Platform: Windows 10 (build 18363), 64-bit edition, 64 bit, Little endian, wxMSW

	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8)
	Boost: 1.73.0
	OCE: 6.9.1
	Curl: 7.71.0
	ngspice: 32
	Compiler: GCC 10.2.0 with C++ ABI 1014

Build settings:
	KICAD_SCRIPTING=ON
	KICAD_SCRIPTING_MODULES=ON
	KICAD_SCRIPTING_PYTHON3=OFF
	KICAD_SCRIPTING_WXPYTHON=ON
	KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
	KICAD_SCRIPTING_ACTION_MENU=ON
	KICAD_USE_OCE=ON
	KICAD_SPICE=ON
Edited by Giorgio Croci Candiani