DSFileImageTag
The DSFileImageTag class represents an image tag that is associated with a file. It inherits from the DSImageTag class and adds additional attributes.
Definition
Assembly: DynamsoftCaptureVisionBundle.xcframework
- Objective-C
- Swift
@interface DSFileImageTag : DSImageTagclass FileImageTag : ImageTag
Attributes & Methods
| Attributes | Type | Description |
|---|---|---|
filePath |
NSString * | The file path of the image. |
pageNumber |
NSInteger | The page number of the current image in the file. |
totalPages |
NSInteger | The total page number of the file. |
| Method | Description |
|---|---|
initWithImageId |
The constructor of the FileImageTag. |
filePath
The file path of the image.
- Objective-C
- Swift
@property (nonatomic, readonly, copy, nullable) NSString *filePath;var filePath: String? { get }
pageNumber
The page number of the current image in the multi-page.
- Objective-C
- Swift
@property (nonatomic, readonly, assign) NSUInteger pageNumber;var pageNumber: Int { get }
totalPages
The total page number of the multi-page.
- Objective-C
- Swift
@property (nonatomic, readonly, assign) NSUInteger totalPages;var totalPages: Int { get }
initWithImageId
The constructor of the FileImageTag.
- Objective-C
- Swift
- (instancetype)initWithImageId:(NSInteger)imageId filePath:(NSString *)filePath pageNumber:(NSInteger)pageNumber totalPages:(NSInteger)totalPages;init(imageId: Int, filePath: String, pageNumber: Int, totalPages: Int)
Parameters
imageId: The ID of the image.
filePath: The file path of the image.
pageNumber: The page number of the current image in the multi-page.
totalPages: The total page number of the multi-page.
Return Value
An instance of the DSFileImageTag.
Code Snippet
- Objective-C
- Swift
DSFileImageTag *fileImageTag = [[DSFileImageTag alloc] initWithImageId:123 filePath:@"Your file path" pageNumber:1 totalPages:10];let fileImageTag = DSFileImageTag(imageId: 123, filePath: filePath, pageNumber: 1, totalPages: 10)