You photograph twelve pages of a signed agreement with your phone. You now have twelve JPEGs, in an order determined by how fast you were working, each 4000 pixels wide and 3 MB. Turning that into something a solicitor will accept involves four decisions, and it is worth making them yourself rather than taking the defaults.
Order comes from filenames, and filenames sort as text
The first surprise is almost always ordering. IMG_9.jpg sorts after IMG_10.jpg, because 1 precedes 9 character by character. Photographs from a phone usually carry sequential names that avoid this, but anything renamed by hand will hit it.
Two ways out. Zero-pad the names, so page-01 through page-12 sort correctly as text. Or accept whatever order you get and fix it afterwards by reordering the pages with thumbnails in front of you, which is more reliable for a short document because you can see what you are doing.
Page size is a decision you should make
When converting images to PDF, each page can either take the dimensions of its image, or be fitted to a standard size like A4.
Taking the image dimensions means a document whose pages are all slightly different sizes, because you did not hold the phone at a consistent distance. It looks fine on screen and prints inconsistently, with content scaled differently page to page.
Fitting to A4 gives a uniform document. The trade is margins: an image with a different aspect ratio to A4 will be letterboxed, and the page will have white bands. That is almost always preferable to a document that prints at twelve different scales.
Resolution: more is not better
A phone photograph of a sheet of A4 at 4000 pixels wide is roughly 480 DPI. That is more detail than the scanner in a solicitor's office would produce and far more than anyone needs to read.
The useful range is 200 to 300 DPI equivalent, which for A4 means about 1700 to 2500 pixels on the long edge. Below that, small print and superscripts start to break down, and OCR accuracy drops sharply. Above it, you are paying megabytes per page for detail nobody will see.
Twelve pages at 3 MB each gives a 36 MB PDF that will bounce off most email limits. The same twelve at a sensible resolution is 3 to 5 MB. Resize the images before converting rather than compressing the PDF afterwards, because you get a cleaner result from downscaling once than from downscaling an already-JPEG-compressed page.
Then comparing two versions
The other half of document work is the opposite question: someone has sent back a revised version and you need to know what moved.
Comparing two PDFs works in one of two ways depending on what is in them.
If both have real text, the comparison is textual: extract the words from each and diff them. This finds inserted clauses, deleted sentences and changed numbers precisely, and it is what you want for a contract.
If either is a scan, there is no text to compare, so the fallback is visual: render both to images and highlight the regions that differ. This catches that something changed on page 4 without being able to say what.
Both have a failure mode worth knowing about.
The sequence for a phone-scanned document
- Photograph each page square-on, in even light, with the page filling the frame.
- Crop each image to the page edges.
- Resize so the long edge is around 2000 pixels.
- Convert to PDF, fitting pages to A4.
- Check the order and reorder if anything is out of place.
- Run OCR if the text needs to be searchable or comparable later.
Step six is the one people skip and later regret, because it is the difference between a document you can search, quote and diff, and twelve pictures.