A4 Portrait / Landscape -

A4 Portrait / Landscape header selector

 
If we change the pre-search relations on the Header element itself then we can simply check whether the page is wider than is is tall (landscape). In this case the header will not match a document where the first page is in landscape.
 
if (PageRect.Width > PageRect.Height) then dontfind();