|
Foxit PDF SDK
|
Instance Methods | |
| (BOOL) | - addEmbeddedFile:file_spec: |
| Add an embedded attachment (as file specification object) with new key name. More... | |
| (BOOL) | - addFromFilePath:file_path: |
| Add a new attachment from specified file path with new key name. More... | |
| (BOOL) | - extractEmbeddedFileTo:dst_file_path: |
| Extract an attachment and save it to a specified file path. More... | |
| (int) | - getCount |
| Get the count of attachments. More... | |
| (FSFileSpec *) | - getEmbeddedFile: |
| Get the attachment (as file specification object) of a specified key. More... | |
| (NSString *) | - getKey: |
| Get the key of an attachment defined in the EmbeddedFiles name tree, by index. More... | |
| (FSPDFNameTree *) | - getNameTree |
| Get the EmbeddedFiles name tree. More... | |
| (id) | - initWithDoc:nametree: |
| Constructor, with parameters. from a PDF document object and an EmbeddedFiles name tree (if any). More... | |
| (id) | - initWithOther: |
| 电子凭证类型:未知。 More... | |
| (BOOL) | - isEmpty |
| 检查当前对象是否为空。 More... | |
| (BOOL) | - removeAllEmbeddedFiles |
| Remove all attachments. More... | |
| (BOOL) | - removeEmbeddedFile: |
| Remove an attachment by key. More... | |
| (BOOL) | - setEmbeddedFile:file_spec: |
| Set an embedded attachment (as file specification object) for a specified key. More... | |
此类表示和OFD附件集合相关的操作。
In application, document's embedded files are known as PDF attachments. This class offers a more convenient way, than class FSPDFNameTree, to get/set embedded files (also known as attachment files) in EmbeddedFiles name tree of a PDF document.
| - (BOOL) addEmbeddedFile: | (NSString *) | key | |
| file_spec: | (FSFileSpec*) | file_spec | |
Add an embedded attachment (as file specification object) with new key name.
All attachments in EmbeddedFiles name tree are ordered by their keys. When a new attachment is added, Foxit PDF SDK will find a suitable place in the name tree to add it. After adding successfully, the indexes of some old keys may be changed.
| [in] | key | New key string. If this is an empty string, the name of input file_spec will be used as the new key. This new key should not have existed in the PDF document to which current attachments object belongs. |
| [in] | file_spec | A file specification object to be added with new key. It should be valid and should has been embedded to the same PDF document as current attachments object. |
| - (BOOL) addFromFilePath: | (NSString *) | key | |
| file_path: | (NSString *) | file_path | |
Add a new attachment from specified file path with new key name.
All attachments in EmbeddedFiles name tree are ordered by their keys. When a new attachment is added, Foxit PDF SDK will find a suitable place in the name tree to add it. After adding successfully, the indexes of some old keys may be changed.
| [in] | key | New key string. If this is an empty string, the name of input file_spec will be used as the new key. This new key should not have existed in the PDF document to which current attachments object belongs. |
| [in] | file_path | A file path to specify a file to be embedded to the PDF document and also added to EmbeddedFiles name tree. |
| - (BOOL) extractEmbeddedFileTo: | (NSString *) | key | |
| dst_file_path: | (NSString *) | dst_file_path | |
Extract an attachment and save it to a specified file path.
| [in] | key | Key string. This should not be an empty string. |
| [in] | dst_file_path | A file path, to which the data of attachment will be saved. This should not be an empty string. |
| - (int) getCount |
Get the count of attachments.
| - (FSFileSpec *) getEmbeddedFile: | (NSString *) | key |
Get the attachment (as file specification object) of a specified key.
| [in] | key | Key string. It should not be an empty string. |
| - (NSString *) getKey: | (int) | index |
Get the key of an attachment defined in the EmbeddedFiles name tree, by index.
| [in] | index | Index of the key string to be retrieved. Valid range: from 0 to (count-1). count is returned by function FSAttachments::getCount. |
| - (FSPDFNameTree *) getNameTree |
Get the EmbeddedFiles name tree.
| - (id) initWithDoc: | (FSPDFDoc*) | doc | |
| nametree: | (FSPDFNameTree*) | nametree | |
Constructor, with parameters. from a PDF document object and an EmbeddedFiles name tree (if any).
| [in] | doc | A valid PDF document object. |
| [in] | nametree | A PDF name tree object that represents an EmbeddedFiles name tree. If this PDF name tree object is constructed by default constructor and has not been set any value, that means the attachments object will be constructed from PDF document; otherwise, please ensure it belongs to the PDF document specified by parameter doc. Default value: a PDF name tree object by default constructor and not set any value. |
| - (id) initWithOther: | (FSAttachments*) | other |
电子凭证类型:未知。
Constructor, with another attachments object.
电子凭证类型:铁路电子客票开具方。
电子凭证类型:铁路电子客票接收方。
电子凭证类型:增值税电子普通发票开具方。
电子凭证类型:增值税电子普通发票接收方 。
电子凭证类型:增值税电子专用发票开具方。
电子凭证类型:增值税电子专用发票接收方。
电子凭证类型:银行电子回单开具方。
电子凭证类型:银行电子回单接收方。
电子凭证类型:银行电子对账单。
电子凭证类型:数电票普通发票。
电子凭证类型:数电票专用发票。
电子凭证类型:电子客票行程单开具方。
电子凭证类型:电子客票行程单接收方。
电子凭证类型:电子非税收入一般缴款书开具方。
电子凭证类型:电子非税收入一般缴款书接收方。
电子凭证类型:财政电子票据。
构造函数,通过另一个附件集合对象。
| [in] | other | 另一个附件集合对象。 |
| [in] | other | Another attachments object. |
| - (BOOL) isEmpty |
检查当前对象是否为空。
Check whether current object is empty or not.
当前对象为空时,表示当前对象是无用的。
When the current object is empty, that means current object is useless.
| - (BOOL) removeAllEmbeddedFiles |
Remove all attachments.
| - (BOOL) removeEmbeddedFile: | (NSString *) | key |
Remove an attachment by key.
If the input key does not exist in EmbeddedFiles name tree, this function will return YES directly.
| [in] | key | Key string. This should not be an empty string. |
| - (BOOL) setEmbeddedFile: | (NSString *) | key | |
| file_spec: | (FSFileSpec*) | file_spec | |
Set an embedded attachment (as file specification object) for a specified key.
| [in] | key | Key string. It should not be an empty string. This name should have existed in current PDF document. |
| [in] | file_spec | A file specification object to be set to the key's value. It should be valid and should has been embedded to the same PDF document as current attachments object. |