The Community commons library has a function MergeMultiplePdfs which allows you to merge pdf documents. You can create two document templates, one for the portrait part and one for the landscape part and then merge these in a microflow.
However, I'm not sure whether that will work on Mendix 4.7.1