!%if LAYOUT_SIZE <> CUSTOM %then
!  %unset CUSTOM_WIDTH
!	%unset CUSTOM_HEIGHT

%if LAYOUT_SIZE = A4 %and LAYOUT_ORIENTATION = PORTRAIT %then
	%set CUSTOM_WIDTH  = '21.0'
	%set CUSTOM_HEIGHT = '29.7'

%if LAYOUT_SIZE = A4 %and LAYOUT_ORIENTATION = LANDSCAPE %then
	%set CUSTOM_WIDTH  = '29.7'
	%set CUSTOM_HEIGHT = '21.0'

%if LAYOUT_SIZE = A3 %and LAYOUT_ORIENTATION = PORTRAIT %then
	%set CUSTOM_WIDTH  = '29.7'
	%set CUSTOM_HEIGHT = '42.0'

%if LAYOUT_SIZE = A3 %and LAYOUT_ORIENTATION = LANDSCAPE %then
	%set CUSTOM_WIDTH  = '42.0'
	%set CUSTOM_HEIGHT = '29.7'
