Foxit PDF SDK
|
Instance Methods | |
(void) | - associateFile:file_spec: |
Associate a file (represented by FSFileSpec ) with a PDF dictionary object which represents the dictionary of an annotation, a PDF page, or other object in PDF document. More... | |
(void) | - associateFileWithAnnot:file_spec: |
Associate a file (represented by FSFileSpec ) with a PDF annotation. More... | |
(void) | - associateFileWithFormXObject:file_spec: |
Associate a file (represented by FSFileSpec ) with a form XObject graphics object. More... | |
(void) | - associateFileWithGraphicsObject:mark_content_item_index:current_resource:property_name:file_spec: |
Associate a file (represented by FSFileSpec ) with a marked content item of a specified graphics object. More... | |
(void) | - associateFileWithImageObject:file_spec: |
Associate a file (represented by FSFileSpec ) with an image graphics object. More... | |
(void) | - associateFileWithPDFPage:file_spec: |
Associate a file (represented by FSFileSpec ) with a PDF page. More... | |
(FSFileSpec *) | - getAssociatedFile:index: |
Get an associated file (represented by FSFileSpec ) in a specified PDF dictionary object, by index. More... | |
(int) | - getAssociatedFilesCount: |
Get the count of associated files in a PDF dictionary object which represents the dictionary of an annotation, a PDF page, or other object in PDF document. More... | |
(int) | - getAssociatedFilesCountWithGraphicsObject: |
Get the count of associated files in a graphics object. More... | |
(FSFileSpec *) | - getAssociatedFileWithGraphicsObject:index: |
Get an associated file a graphics object, by index. More... | |
(id) | - initWithOther: |
Constructor, with another associated files object. More... | |
(id) | - initWithPdf_doc: |
Constructor, with a PDF document. More... | |
(BOOL) | - isEmpty |
Check whether current object is empty or not. More... | |
(void) | - removeAssociatedFile:index: |
Remove an associated file (represented by FSFileSpec ) in a specified PDF dictionary object, by index. More... | |
(void) | - removeAssociatedFileWithGraphicsObject:index: |
Remove an associated file a graphics object, by index. More... | |
In PDF 2.0, a new concept named "Associated files" is defined. Associated files provide a means to associate content in other formats with objects of a PDF file and identify the relationship between the content and the objects. Such associated files are designated using file specification dictionaries (known as file specification). Associated files could be linked to the PDF document's catalog, a page dictionary, graphics objects, structure elements, XObject, DParts, an annotation dictionary and so on. Specially, associated files with graphics objects means to be associated with the marked content item.
Class FSAssociatedFiles is the class for managing associate files. It offers the functions to count/get associate files in PDF dictionary or graphics object, to associate files (represented by FSFileSpec ) with catalog, PDF pages, graphics objects, form XObject objects, annotation objects and so on.
Specially, when construct an associated files object with a PDF document, the file version of the related PDF document will be set to 2.0.
- (void) associateFile: | (FSPDFObject*) | pdf_object | |
file_spec: | (FSFileSpec*) | file_spec | |
Associate a file (represented by FSFileSpec ) with a PDF dictionary object which represents the dictionary of an annotation, a PDF page, or other object in PDF document.
[in] | pdf_object | A valid PDF object. It should be either a PDF dictionary object or a PDF reference object that refers to a PDF dictionary object. |
[in] | file_spec | A file specification object to be associated with specified PDF dictionary. It should not be an empty string. |
- (void) associateFileWithAnnot: | (FSAnnot*) | annot | |
file_spec: | (FSFileSpec*) | file_spec | |
Associate a file (represented by FSFileSpec ) with a PDF annotation.
In fact, this function is equals to associate a file with a PDF dictionary of a PDF annotation.
[in] | annot | A valid PDF annotation. |
[in] | file_spec | A file specification object to be associated with specified PDF annotation object. It should not be an empty string. |
- (void) associateFileWithFormXObject: | (FSFormXObject*) | form_xobject | |
file_spec: | (FSFileSpec*) | file_spec | |
Associate a file (represented by FSFileSpec ) with a form XObject graphics object.
In fact, this function is equals to associate a file with a PDF dictionary of a form XObject graphics object.
[in] | form_xobject | A form XObject graphics object. It should not be nil. |
[in] | file_spec | A file specification object to be associated with specified form XObject graphics object. It should not be an empty string. |
- (void) associateFileWithGraphicsObject: | (FSGraphicsObject*) | graphics_object | |
mark_content_item_index: | (int) | mark_content_item_index | |
current_resource: | (FSPDFObject*) | current_resource | |
property_name: | (NSString *) | property_name | |
file_spec: | (FSFileSpec*) | file_spec | |
Associate a file (represented by FSFileSpec ) with a marked content item of a specified graphics object.
[in] | graphics_object | A valid graphics object. |
[in] | mark_content_item_index | The index of marked content item in input graphic object to which the specified file specification object is to associated with. Valid range: from 0 to (count-1). count is returned by function FSMarkedContent::getItemCount of the marked content related to input graphics object. |
[in] | current_resource | A resource dictionary of a PDF page to which input graphics object is related. This can also be a PDF reference object that refers to such a PDF dictionary. |
[in] | property_name | A property name used in "Properties" dictionary of input resource dictionary. It should not be an empty string. |
[in] | file_spec | A file specification object to be associated with specified marked content item of a specified graphics object. It should not be an empty string. |
- (void) associateFileWithImageObject: | (FSImageObject*) | image | |
file_spec: | (FSFileSpec*) | file_spec | |
Associate a file (represented by FSFileSpec ) with an image graphics object.
In fact, this function is equals to associate a file with a PDF dictionary of an image graphics object.
[in] | image | An image graphics object. It should not be nil. |
[in] | file_spec | A file specification object to be associated with specified image graphics object. It should not be an empty string. |
- (void) associateFileWithPDFPage: | (FSPDFPage*) | page | |
file_spec: | (FSFileSpec*) | file_spec | |
Associate a file (represented by FSFileSpec ) with a PDF page.
In fact, this function is equals to associate a file with a PDF page dictionary.
[in] | page | A valid PDF page. |
[in] | file_spec | A file specification object to be associated with specified PDF page. It should not be an empty string. |
- (FSFileSpec *) getAssociatedFile: | (FSPDFObject*) | pdf_object | |
index: | (int) | index | |
Get an associated file (represented by FSFileSpec ) in a specified PDF dictionary object, by index.
[in] | pdf_object | A valid PDF object. It should be either a PDF dictionary object or a PDF reference object that refers to a PDF dictionary object. |
[in] | index | The index of an associated file in the specified PDF dictionary object. Valid range: from 0 to (count-1). count is returned by function FSAssociatedFiles::getAssociatedFilesCount: with same parameter object. |
- (int) getAssociatedFilesCount: | (FSPDFObject*) | pdf_object |
Get the count of associated files in a PDF dictionary object which represents the dictionary of an annotation, a PDF page, or other object in PDF document.
[in] | pdf_object | A valid PDF object. It should be either a PDF dictionary object or a PDF reference object that refers to a PDF dictionary object. |
- (int) getAssociatedFilesCountWithGraphicsObject: | (FSGraphicsObject*) | graphics_object |
Get the count of associated files in a graphics object.
One or more files may be associated with sections of content in a content stream by enclosing those sections between the marked content. So, in fact, this function is to count associated files in the marked content related to the graphics object.
[in] | graphics_object | A valid PDF graphics object. |
- (FSFileSpec *) getAssociatedFileWithGraphicsObject: | (FSGraphicsObject*) | graphics_object | |
index: | (int) | index | |
Get an associated file a graphics object, by index.
One or more files may be associated with sections of content in a content stream by enclosing those sections between the marked content. So, in fact, this function is to get an associated files (specified by index) in the marked content related to the graphics object.
[in] | graphics_object | A valid PDF graphics object. |
[in] | index | The index of an associated file in the specified PDF graphics object. Valid range: from 0 to (count-1). count is returned by function FSAssociatedFiles::getAssociatedFilesCount: with same parameter graphics_object. |
- (id) initWithOther: | (FSAssociatedFiles*) | other |
Constructor, with another associated files object.
[in] | other | Another associated files object. |
- (id) initWithPdf_doc: | (FSPDFDoc*) | pdf_doc |
Constructor, with a PDF document.
When an associated files object is constructed by this constructor, the file version of input PDF document will be set to 2.0.
[in] | pdf_doc | A valid PDF document object. |
- (BOOL) isEmpty |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
- (void) removeAssociatedFile: | (FSPDFObject*) | pdf_object | |
index: | (int) | index | |
Remove an associated file (represented by FSFileSpec ) in a specified PDF dictionary object, by index.
[in] | pdf_object | A valid PDF object. It should be either a PDF dictionary object or a PDF reference object that refers to a PDF dictionary object. |
[in] | index | The index of an associated file in the specified PDF dictionary object. Valid range: from 0 to (count-1). count is returned by function FSAssociatedFiles::getAssociatedFilesCount: with same parameter object. |
- (void) removeAssociatedFileWithGraphicsObject: | (FSGraphicsObject*) | graphics_object | |
index: | (int) | index | |
Remove an associated file a graphics object, by index.
One or more files may be associated with sections of content in a content stream by enclosing those sections between the marked content. So, in fact, this function is to count associated files in the marked content related to the graphics object.
[in] | graphics_object | A valid PDF graphics object. |
[in] | index | The index of an associated file in the specified PDF graphics object. Valid range: from 0 to (count-1). count is returned by function FSAssociatedFiles::getAssociatedFilesCount: with same parameter graphics_object. |