Open Photos → PDF from the Home screen (or use its own page link).
Tap Start and pick all the photos from your gallery (you can select many).
Check the small pages: ◀ ▶ move a page, ⟳ rotates it, ✕ deletes a bad page. Tap Add more pages if you missed one.
Pick a Clean-up style, keep Auto-crop to the paper ticked, then tap Start to build the PDF.
When you see Done!, tap Download. The new file is saved on your phone or computer.