Initial situation: there is a working iOS application for field service employees (iOS 16-17). Nowadays, client documents are photographed with a regular camera, after which managers manually crop, align and reprint the data. It is necessary to integrate an offline scanning and recognition module to speed up registration and reduce errors. Technical environment and limitations: Swift project, MVVM architecture, assembly via Xcode, dependencies via SPM. There is often no Internet on the device, so the entire pipeline must work offline. You cannot use third-party paid SDKs and cloud OCR services. Only Apple system frameworks are valid. Minimum version of iOS 16. The data is personal - do not send anything externally, do not save it in Photos, store only in the sandbox of the application. What needs to be done: implement a scanning screen with streaming document search, auto-shooting based on stability, perspective correction and improved readability. Once scanned, the document should be converted to a multi-page PDF, OCR performed, and the result returned to the application as PDF + structured text. Add a batch scanning mode - up to 20 pages per session, with the ability to retake a page, change the order, delete, merge into one PDF. Functional Requirements: 1) Scanning: document rectangle detection, frame quality indication, auto shooting, manual shooting, manual angle adjustment after taking a photo. 2) Preprocessing: brightness/contrast normalization, shadow suppression, sharpening within reasonable limits to make the text more readable. 3) OCR: text recognition in Russian and English, if possible with automatic detection of languages; return the full text and an array of bounding boxes in the coordinates of the original page. 4) Export: PDF/A-like PDF (regular PDF is acceptable), each page is an image + text layer (if implemented on the system API), or PDF + separate JSON with OCR layers. 5) Integration: the finished module is connected to the existing ticket screen through a single public interface (protocol/facade) so that the team can reuse the module in other parts of the application. Acceptance criteria (measurable): the module is built in the current project without additional paid dependencies; on iPhone 12 and newer, a package of 10 pages is processed completely offline in no longer than 60 seconds (including OCR) under typical office lighting; recognition accuracy for printed text on A4 is no lower than 95% for characters on a test set of 20 images provided by the customer; the final PDF size does not exceed 1.5 MB per page with readable quality; there are no leaks of personal data - scans do not end up in Photos and are not written to public directories. Expected result: PR/commit(s) to the repository with a ready-made module, minimal edits to existing screens for integration, setting camera resolutions, and short instructions for use. You also need a small set of autotests for critical parts (for example, parsing/generating the JSON OCR layer and checking the page sequence) and a manual checklist for QA. Tools: Swift, AVFoundation/Vision/CoreImage/PDFKit (or system equivalents), Xcode, SPM. As the work progresses, performance and memory analysis will be required so that batch processing does not crash on 4-6 GB RAM devices.