On this page
Every student has sent a blurry phone photo of a form when the office asked for a PDF. This brief turns that moment into a small offline tool: choose a few photos or take new ones, put them in the right order, trim the edges and get one PDF in Downloads that opens anywhere. The best fit is native Android, where the system photo picker, CameraX, PdfDocument and MediaStore cover the whole job without a server, an account or ads. An iPhone version is possible with PhotosPicker and PDFKit, but it needs a Mac with Xcode to build. The first proof is concrete: three real photos become a three-page PDF that a different app opens correctly after a restart.
Screens
- Start: Pick images from the gallery or open the camera, with a short line saying nothing is uploaded.
- Pages: Reorder thumbnails by drag, remove a page and see the page count update.
- Crop: Adjust the frame of one page and rotate it in 90-degree steps before export.
- Export: Name the file, choose page size and margins, then save the PDF.
- Recent PDFs: Reopen, share or delete files this app created earlier.
Data model
| Table | Key fields | Purpose |
|---|---|---|
| drafts | id (uuid), created_at (timestamptz), page_size (text), margin_mm (int) | One unfinished document the user can return to after leaving the app. |
| draft_pages | id (uuid), draft_id (uuid), position (int), source_uri (text), crop_rect (text), rotation (int) | Page order and edits stored as instructions, so the original photo is never overwritten. |
| exports | id (uuid), draft_id (uuid), file_name (text), content_uri (text), page_count (int), exported_at (timestamptz) | A history of saved PDFs that still points at the real file in Downloads. |
Everything here stays on the phone, so no backend is needed and none should be added by default. Keep a working copy of each picked image in app-private storage, because a gallery permission grant can expire and the source photo might be deleted mid-edit. Exported PDFs belong to the user in the shared Downloads collection, not to the app: uninstalling should leave them in place. If the owner later wants cloud backup, connect your own Supabase with row-level security on each person's files, and say so in the interface before the first upload happens.
Native features
The whole value of this tool is that it uses what the phone already offers instead of a web upload form. The system photo picker returns only the images the user chose, without asking for broad storage access. CameraX gives a direct capture path for paper pages. PdfDocument draws each bitmap onto a page canvas at a chosen size, and MediaStore places the result in Downloads where file managers, mail apps and messaging apps can find it.
| Feature | Android (Kotlin) | iPhone (SwiftUI) | Notes |
|---|---|---|---|
| Choosing photos | PickMultipleVisualMedia photo picker | PhotosPicker with a selection limit | No full gallery permission is needed for picked items; copy them before editing. |
| Capturing pages | CameraX ImageCapture with tap to focus | UIImagePickerController or a camera view | Camera access is optional; denying it must leave the gallery route working. |
| Writing the PDF | android.graphics.pdf.PdfDocument | PDFKit PDFDocument or UIGraphicsPDFRenderer | Scale each image to the page, respect margins and keep orientation from EXIF data. |
| Saving and sharing | MediaStore.Downloads insert plus ACTION_SEND | File export sheet and ShareLink | Share a content URI with read permission; never a raw file path. |
Android notes (Kotlin and Jetpack Compose)
Show draft pages in a LazyVerticalGrid keyed by page ID, so a drag reorder animates the moved thumbnail rather than redrawing the whole grid. Keep the draft in a ViewModel backed by Room; rotating the phone in the middle of a crop should not lose the frame the user just set.
- Register rememberLauncherForActivityResult with PickMultipleVisualMedia and copy each returned URI into filesDir on a background dispatcher. Decode large photos with inSampleSize for thumbnails, and decode at full resolution only while drawing the final page.
- Render the PDF off the main thread: create a PdfDocument, start one page per image at A4 or Letter points, draw the cropped and rotated bitmap with a Matrix, then write to an output stream from MediaStore with IS_PENDING set until the write finishes.
- On a real Android phone, pick a portrait photo, a landscape photo and one taken with CameraX, reorder them, crop one, and export. Open the PDF in another app, then turn on airplane mode and repeat the export to confirm no network path exists.
iPhone notes (Swift and SwiftUI)
On iPhone, PhotosPicker can load chosen images as Data through Transferable, and a NavigationStack can move from pages to crop to export. Keep page order in SwiftData so a half-made document survives the app being closed.
- Draw pages with UIGraphicsPDFRenderer using a fixed page rectangle, fitting each image inside the margins and honouring imageOrientation so a sideways phone photo is not exported rotated.
- Use fileExporter or ShareLink to hand the finished PDF to Files, Mail or a messaging app. Present a clear message when there is not enough storage rather than producing an empty document.
- Test on a physical iPhone, since the Simulator has no camera. Export five pages, open the result in Files, check the page order, and confirm VoiceOver reads the page count and the move-up and move-down actions.
Copy-paste prompt
My college keeps asking for PDFs and every converter app is full of ads or uploads my photos somewhere. Build me a clean image to PDF converter for Android that works fully offline. Screens: Start, Pages, Crop, Export and Recent PDFs. Let me pick several photos with the system photo picker or snap new pages with the camera, drag pages into order, delete one, crop and rotate a page, then choose A4 or Letter and a margin. Save drafts locally (drafts, draft_pages, exports) and keep my original photos untouched. Write a real PDF with the native PDF API, save it to Downloads with a file name I choose, and open the share sheet so I can send it on WhatsApp or mail. No account, no ads, no uploads, no analytics. Handle a denied camera permission, a photo that fails to load, low storage and an empty draft with clear messages. Acceptance: three photos in a new order become a three-page PDF that another app opens correctly, and it is still listed in Recent PDFs after I reopen the app.
Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.
Acceptance test
- Pick two gallery photos, one portrait and one landscape, and capture a third page with the camera on a real phone.
- Move the camera page to position one, crop it tightly and rotate the landscape page; confirm the thumbnails match the intended order.
- Export as A4 with a 10 mm margin, open the file from Downloads in a different PDF viewer and check page count, order and orientation.
- Close the app fully, reopen it and verify the export appears in Recent PDFs and the share sheet still sends the same file.
- Deny camera access and delete one source photo from the gallery mid-draft; the gallery route must still work and the draft must keep its own copy.
Check file size as well as looks. A twelve-megapixel photo drawn at full resolution can create a huge PDF, so agree a sensible output resolution with the owner and compare the exported size against it. An empty draft should offer the picker instead of an Export button, and a failed write should remove the pending Downloads entry instead of leaving a zero-byte file with the chosen name.
Frequently asked questions
Does this upload my photos anywhere?
No. The brief keeps picking, editing and PDF writing on the phone, with no account and no network calls. If you later want backup, it has to be added on purpose with your own Supabase and a clear notice.
Can it read the text in my photos?
Not in this version: it makes an image PDF. Searchable text needs on-device text recognition as a separate step, and the result should be checked, because recognition can misread handwriting and stamps.
Why is Android the best fit here?
The photo picker, CameraX, PdfDocument and the Downloads collection give a complete offline flow, and the file lands where Android users already look. The iPhone route works too, but building it needs a Mac with Xcode.
Build this blueprint
The blueprint prompt, ready for your platform. Edit anything before you send it.
Opens Apirex with this prompt. Pick the Android · Kotlin tab before you send. The Free plan includes 5 Rex Credits a day.