Bake the rotation into pixels so no flag is needed.
Check orientation before converting a twenty-page batch.
Do not force a single page size across mixed orientations.
Phones store the sensor image plus a rotation flag (EXIF Orientation) describing how it should be displayed. A viewer that honours the flag shows it upright; a converter that ignores it lays down the raw pixels, which for a portrait shot means a landscape page with the content on its side. The file is not wrong — the two programs disagree about the flag.
Two reliable routes: rotate and save in the gallery editor, which bakes the rotation into the pixels, or shoot with the phone already held in the orientation you want. Screenshots and edited images usually carry no flag at all, which is exactly why they convert correctly while camera shots do not.
Rotating a page afterwards works, but most free tools re-render the page and re-rendering a scan costs sharpness. Once is harmless; three times on the same file is how a readable scan turns to mush.
A typical case: five portrait receipts and one landscape table photo. Do not force everything into one page size — merging keeps each page's own dimensions, so the landscape page prints correctly. Forcing A4 portrait on all of them shrinks the wide table to a postage stamp.
On iPhone, HEIC originals carry the flag and some desktop converters drop it during decoding; exporting upright JPEGs first avoids the whole class of problems. On Android, some third-party gallery apps save the rotated preview without updating the flag, so the image looks right in that app and sideways everywhere else. Check the file in two different apps before sending anything official.
That photo carries a different flag — rotate that one file and re-convert.
No resampling happens if the image fits; page size changes, pixels do not.
Yes, page rotation exists in most viewers, at the cost of a re-render each time.