How to Implement Multipage Image Capture with User Interface

 Note: Before you begin, see How to Add the Library to Your Xcode Project.

  1. Add the NSCameraUsageDescription and NSPhotoLibraryUsageDescription keys into the info.plist file for requesting access to the device’s camera and to the user’s photo library.
  2. Create an instance of the AUICaptureController interface for managing user interface and starting capture scenario. On this step you can use the properties of this interface to tune the user interface appearance and the settings of the camera.
  3. To get access to the processing mechanisms for chosen scenario create an RTREngine object using the sharedEngineWithLicenseData: method. The method requires an NSData object containing your license data. For example, you can use dataWithContentsOfFile: to create a data object, then pass this object to the sharedEngineWithLicenseData: method.
  4. Create an instance of an interface inherited from the AUICaptureScenario for managing the capture scenario. Choose the inherited interface for the multipage image capture scenario: AUIMultiPageImageCaptureScenario interface. Pass the previously created RTREngine object and a full path to a folder, that will be a page storage, as input parameters to the constructor.
  5. Use the properties of the AUIMultiPageImageCaptureScenario interface for flexible tuning of your application. I.e., depending on your application goal you can tune the presets of the scenario user interface and image count requirements:
  1. Implement the delegate interface, corresponding to the scenario object, and its methods. I.e. for AUIMultiPageImageCaptureScenarioDelegate interface you should implement these methods:
    1. The captureScenario:didFinishWithResult: method returns the AUIMultiPageImageCaptureResult object providing access to the result images
    2. The captureScenario:onCloseWithResult: method notifies that the scenario was canceled by user
    3. The captureScenario:didFailWithError: method delivers error messages.
  2. Add the instance of the interface as a delegate property of the AUIMultiPageImageCaptureScenario object.
  3. Set the created scenario object as a captureScenario property of the AUICaptureController object. Scenario will start immediately at the camera start.
  4. If any error occurs while processing, the capture scenario becomes temporary passive and the paused property of the AUICaptureController object is set to true.
  5. Process the messages sent by scenario to the delegate object. The result will be delivered as an AUIMultiPageImageCaptureResult object providing access to the result images.

02.03.2022 12:59:15

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.