Table of contents

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
  1. @interface DSFileImageTag : DSImageTag
    
  2. 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
  1. @property(nonatomic, copy, readonly) NSString *filePath;
    
  2. var filePath: String? { get }
    

pageNumber

The page number of the current image in the multi-page.

  • Objective-C
  • Swift
  1. @property (nonatomic, readonly) NSInteger pageNumber;
    
  2. var pageNumber: Int { get }
    

totalPages

The total page number of the multi-page.

  • Objective-C
  • Swift
  1. @property (nonatomic, readonly) NSInteger totalPages;
    
  2. var totalPages: Int { get }
    

initWithImageId

The constructor of the FileImageTag.

  • Objective-C
  • Swift
  1. - (instancetype)initWithImageId:(NSInteger)imageId
                       filePath:(NSString *)filePath
                     pageNumber:(NSInteger)pageNumber
                     totalPages:(NSInteger)totalPages;
    
  2. 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
  1. DSFileImageTag *fileImageTag = [[DSFileImageTag alloc] initWithImageId:123 filePath:@"Your file path" pageNumber:1 totalPages:10];
    
  2. let fileImageTag = DSFileImageTag(imageId: 123, filePath: filePath, pageNumber: 1, totalPages: 10)
    

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: