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: DynamsoftCore.xcframework
- Objective-C
- Swift
@interface DSFileImageTag : DSImageTag
class FileImageTag : ImageTag
Methods & Attributes
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, copy, readonly) NSString *filePath;
var filePath: String? { get }
pageNumber
The page number of the current image in the multi-page.
- Objective-C
- Swift
@property (nonatomic, readonly) NSInteger pageNumber;
var pageNumber: Int { get }
totalPages
The total page number of the multi-page.
- Objective-C
- Swift
@property (nonatomic, readonly) NSInteger 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)