My receipt photo looks upright on my phone but comes out sideways in a PDF; why?
The culprit is a small tag inside the photo called EXIF orientation. Your phone stores the picture the way the sensor captured it and writes a note saying rotate a quarter turn when displaying; the gallery obeys that note, PDF ignores it. Our images to PDF tool reads the tag and rotates the actual pixels before embedding, so the page looks the way it does on your phone.
How a phone stores a portrait shot
Most phone camera sensors are wide rectangles. Hold the phone upright to shoot a receipt and the file is often saved with landscape dimensions such as 4032 × 3024 px, meaning the receipt really is stored on its side. The phone then adds an orientation tag, for example value 6, which means the picture must be turned a quarter turn to display correctly.
Your gallery and most photo apps read that tag, so you see the receipt upright. PDF has no concept of an orientation tag, so an app that drops the file straight in shows it sideways, exactly as the sensor stored it.
What our tool does, exactly
- Images to PDF reads the orientation tag of each JPEG as you add it.
- If the value is 1, meaning the photo is already upright, it is embedded byte for byte with no change.
- If it is anything else, such as 6 or 8 for portrait shots or 3 for an upside down one, the photo is decoded, its pixels are really rotated, and it is written again as JPEG at quality 92.
- A line next to the file name says it was rotated for its EXIF orientation and re-encoded at quality 92, so you know which photos were touched.
In numbers: a photo stored as 4032 × 3024 with orientation 6 becomes 3024 × 4032 after rotation, so with orientation set to Follow the image the tool picks a portrait A4 page by itself and draws the photo 538.59 × 718.12 pt inside a 10 mm margin. The dimensions shown in the list are the rotated ones.
Does the rotation cost any quality?
A little. Rewriting at quality 92 loses fine detail you will hardly see in a receipt or document. This is the only case in which the tool re-encodes a JPEG, and it tells you rather than hiding it. There is a side benefit: redrawing drops the other EXIF data, such as the shooting location, from that photo.
What if the photo is sideways even in the gallery?
That is a different problem. Shoot a receipt with the phone lying flat on a desk and the phone can guess the orientation wrong, writing a wrong tag, so the photo looks sideways in the gallery too. The tool follows the tag as written, so the page will be sideways as well. Rotate the photo first with Image rotator and flipper until it looks upright, then add it to the PDF.
Common questions
Why do my photos look right in your tool but sideways in another app?
That app embedded the file as it was and left the orientation tag behind, which PDF ignores. Our tool rotates the pixels before embedding.
Does this happen with PNG files?
Screenshots and PNG images normally carry no orientation tag, so they go in as they are.
Can I avoid the re-encoding?
If you rotate and save the photo upright before converting, so its orientation becomes 1, the converter embeds it without re-encoding, although the app you rotate it in may itself re-save it once.
