Thanks for downloading Dynamsoft Barcode Reader Package!
Your download will start shortly. If your download does not begin, click here to retry.
Processing Multiple Images/Pages
Method | Description |
---|---|
setInput |
Sets an image source that will provide images to be consecutively processed. |
getInput |
Gets the attached image source adapter object of the Capture Vision Router. |
addImageSourceStateListener |
Registers a DSImageSourceStateListener object to be used as a callback when the status of DSImageSourceAdapter changes. |
removeImageSourceStateListener |
Removes a DSImageSourceStateListener from the Capture Vision Router. |
addResultReceiver |
Registers a result receiver to be used as a callback when the library outputs a captured result. |
removeResultReceiver |
Removes a result receiver from the Capture Vision Router. |
startCapturing |
Start capturing with the specified template. |
stopCapturing |
Tells the Capture Vision Router to stop capturing. |
addCaptureStateListener |
Registers a DSCaptureStateListener to be used as a callback when capture state changes. |
removeCaptureStateListener |
Removes a DSCaptureStateListener that has been configured for the Capture Vision Router. |
addResultFilter |
Registers a DSCapturedResultFilter to be used as a callback when the Capture Vision Router outputs filtered result(s). |
removeResultFilter |
Removes a DSCapturedResultFilter that has been configured for the Capture Vision Router. |
setInput
Sets an image source that will provide images to be consecutively processed.
- Objective-C
- Swift
- (BOOL)setInput:(DSImageSourceAdapter *)adapter error:(NSError * _Nullable * _Nullable)error;
func setInput(_ adapter: DSImageSourceAdapter) throws -> BOOL
Parameters
adapter
: An object of DSImageSourceAdapter
. You can use an internally implemented ImageSourceAdapter
such as CameraEnhancer
, DirectoryFetcher
or FileFetcher
.
error
: An NSError
pointer. If an error occurs, it will represent the error information.
Error
Error Code | Value | Description |
---|---|---|
EC_CALL_REJECTED_WHEN_CAPTURING | -10062 | Function call is rejected when capturing in progress. |
Return Value
A BOOL value that indicates whether the input is set successfully.
getInput
Gets the attached image source adapter (DSImageSourceAdapter
) object of the Capture Vision Router.
- Objective-C
- Swift
- (DSImageSourceAdapter *)getInput;
func getInput() -> DSImageSourceAdapter
Return Value
The attached DSImageSourceAdapter
object of the capture vision router.
addImageSourceStateListener
Registers a DSImageSourceStateListener
object to be used as a callback when the status of DSImageSourceAdapter
is received.
- Objective-C
- Swift
- (BOOL)addImageSourceStateListener:(id<DSImageSourceStateListener>)listener;
func addImageSourceStateListener(_ listener:DSImageSourceStateListener) -> BOOL
Parameters
listener
: An object of DSImageSourceStateListener
.
Return Value
A BOOL value that indicates whether the DSImageSourceStateListener
is added successfully.
removeImageSourceStateListener
Removes a DSImageSourceStateListener
from the Capture Vision Router.
- Objective-C
- Swift
- (BOOL)removeImageSourceStateListener:(id<DSImageSourceStateListener>)listener;
func removeImageSourceStateListener(_ listener:DSImageSourceStateListener) -> BOOL
Parameters
listener
: An object of DSImageSourceStateListener
.
Return Value
A BOOL value that indicates whether the DSImageSourceStateListener
is removed successfully.
addResultReceiver
Registers a DSCapturedResultReceiver
to be used as a callback when the library outputs a DSCapturedResult
.
- Objective-C
- Swift
- (BOOL)addResultReceiver:(id<DSCapturedResultReceiver>)receiver;
func addResultReceiver(_ listener:DSCapturedResultReceiver) -> BOOL
Parameters
listener
: An object of DSCapturedResultReceiver
.
Return Value
A BOOL value that indicates whether the result receiver is added successfully.
removeResultReceiver
Removes a DSCapturedResultReceiver
from the Capture Vision Router.
- Objective-C
- Swift
- (BOOL)removeResultReceiver:(id<DSCapturedResultReceiver>)receiver;
func removeResultReceiver(_ listener:DSCapturedResultReceiver) -> BOOL
Parameters
listener
: An object of DSCapturedResultReceiver
.
Return Value
A BOOL value that indicates whether the result receiver is removed successfully.
startCapturing
Start capturing with the specified template.
- Objective-C
- Swift
- (BOOL)startCapturing:(NSString*)templateName error:(NSError * _Nullable * _Nullable)error;
func startCapturing(_ templateName:String) throws -> BOOL
Parameters
templateName
: The name of a template that you have previously set via initSettings
or initSettingsFromFile
.
error
: An NSError
pointer. If an error occurs, it will represent the error information.
Error
Error Code | Value | Description |
---|---|---|
EC_TEMPLATE_NAME_INVALID | -10036 | The target template name is invalid. |
EC_CALL_REJECTED_WHEN_CAPTURING | -10062 | Function call is rejected when capturing in progress. |
EC_NO_IMAGE_SOURCE | -10063 | Can not start capturing before you set the input. |
Return Value
A BOOL value that indicates whether the capture starts successfully.
stopCapturing
Tells the Capture Vision Router to stop capturing.
- Objective-C
- Swift
- (void)stopCapturing;
func stopCapturing()
addCaptureStateListener
Registers a DSCaptureStateListener
to be used as a callback when capture state changes.
- Objective-C
- Swift
- (BOOL)addCaptureStateListener:(nonnull id<DSCaptureStateListener>)listener;
func addCaptureStateListener(_ listener:DSCaptureStateListener) -> BOOL
Parameters
listener
: A delegate object of DSCaptureStateListener
to receive the capture state.
Return Value
A BOOL value that indicates whether the capture state listener is added successfully.
removeCaptureStateListener
Removes a DSCaptureStateListener
that has been configured for the Capture Vision Router via the addCaptureStateListener
method.
- Objective-C
- Swift
- (BOOL)removeCaptureStateListener:(nonnull id<DSCaptureStateListener>)listener;
func removeCaptureStateListener(_ listener:DSCaptureStateListener) -> BOOL
Parameters
listener
: An object of DSCaptureStateListener
.
Return Value
A BOOL value that indicates whether the capture state listener is removed successfully.
addResultFilter
Registers a DSCapturedResultFilter
to be used as a callback when the Capture Vision Router outputs filtered result(s).
- Objective-C
- Swift
- (BOOL)addResultFilter:(nonnull id<DSCapturedResultFilter>)filter;
func addResultFilter(_ filter:DSCapturedResultFilter) -> BOOL
Parameters
filter
: An object of DSCapturedResultFilter
.
Return Value
A BOOL value that indicates whether the result filter is added successfully.
removeResultFilter
Removes a DSCapturedResultFilter
that has been configured for the Capture Vision Router via the addResultFilter
method.
- Objective-C
- Swift
- (BOOL)removeResultFilter:(nonnull id<DSCapturedResultFilter>)filter;
func removeResultFilter(_ filter:DSCapturedResultFilter) -> BOOL
Parameters
filter
: An object of DSCapturedResultFilter
.
Return Value
A BOOL value that indicates whether the result filter is removed successfully.