If you use a conditional step there will be two action one to create portrait print files 3400 px x 4600 px and one to create landscape print files 4600 px x 3400px files,
You start by recording the Landscaper Action
1 Set 120Pixels/cm print resolution Image size resample not checked set resolution
2 Fit image 4600 px width 3400px height
3 Canvas size 4600 px width 3400px height make sure both width and height settings are recorded. To do this you can start recording the action on a new document witha a canvas size like 10px by 10px at 100pcv. To record the actop on. Then step one Sete the PPC resolution as the first step then record the 3 Canvas size 4600 px width 3400px height then the Fit image step stop recording the action amy move the fit image step before the canvas size step.
Next you record the main Action PortraitLandscape
Create a new document 10px by 10px at 100PPC. Start recording your new PortraitLandscape action immediately click the Stop recording button in the action palette then use the Action palette flout menu to insert a conditionals step. If document is Landscapet then play Landscape. Next click the record button in the action palette and continue recording the action to create the portrait print file like you recorded the landscape action.

Then use menu File>Scripts>Image Processor to batch the PortraitLandscape action and save the print file to where you want them stored. as Jpeg, Tiff or PSD files.