Sometimes your camera does not rotate as it should when you turn the iPad from a "landscape" (horizontal) to "portrait" (vertical) view, and your photos are taken upside down or sideways.

There are a few settings you need to check on the iPad:

1. Check the Rotation lock is not on.  

If you swipe upwards from the bottom of the screen you should see this menu, ensure the Rotation Lock is OFF.  Some older iPads have a physical button on the side of the iPad that turns this setting ON/OFF.

Rotation Lock OFF

2.  If the image is rotated incorrectly you can jiggle or rock the iPad side to side (like a drivers wheel) which will rotate the image to the correct position. You should only need to do this once.

3.  In some cases, it might be an iPad-specific issue for some models causing orientation issues, so from the "Apple Settings" on the iPad, navigate to:
 Settings > General > Accessibility > Reduce Motion > turn OFF
and then
Go to Apple Settings > General >  under Use Side Switch To > Mute

Restart the iPad.  Completely power off and back on again and try using PIM again.