Foxit PDF SDK
|
Instance Methods | |
(float) | - getBottom |
Get bottom position value. More... | |
(FSPDFArray *) | - getDestArray |
Get the destination PDF array. More... | |
(float) | - getLeft |
Get left position value. More... | |
(int) | - getPageIndex: |
Get the index of the destination page. More... | |
(float) | - getRight |
Get right position value. More... | |
(float) | - getTop |
Get top position value. More... | |
(float) | - getZoomFactor |
Get zoom factor. More... | |
(FSDestinationZoomMode) | - getZoomMode |
Get the zoom mode. More... | |
(id) | - initWithDest_array: |
Constructor, with a specified PDF array object. More... | |
(id) | - initWithOther: |
Constructor, with another destination object. More... | |
(BOOL) | - isEmpty |
Check whether current object is empty or not. More... | |
(BOOL) | - isLeftNull |
Check if left value is a null object. More... | |
(BOOL) | - isTopNull |
Check if top value is a null object. More... | |
A destination defines a particular view of a PDF document, consisting of the following items:
Destinations may be associated with bookmarks, or some types of actions. In each case, the destination specifies the view of the document to be presented when the bookmark item or link annotation is opened or the action is performed.
This class offers functions to create destination objects for different zoom modes, and get destination data.
+ (FSDestination *) createFitBBox: | (FSPDFDoc*) | document | |
page_index: | (int) | page_index | |
Create a destination object for zoom mode FSDestinationZoomFitBBox.
[in] | document | A valid PDF document object. |
[in] | page_index | The index of the destination page in the PDF document. |
+ (FSDestination *) createFitBHorz: | (FSPDFDoc*) | document | |
page_index: | (int) | page_index | |
top: | (float) | top | |
Create a destination object for zoom mode FSDestinationZoomFitBHorz.
[in] | document | A valid PDF document object. |
[in] | page_index | The index of the destination page in the PDF document. |
[in] | top | The vertical coordinate of top edge |
+ (FSDestination *) createFitBVert: | (FSPDFDoc*) | document | |
page_index: | (int) | page_index | |
left: | (float) | left | |
Create a destination object for zoom mode FSDestinationZoomFitBVert.
[in] | document | A valid PDF document object. |
[in] | page_index | The index of the destination page in the PDF document. |
[in] | left | Horizontal coordinate of left edge. |
+ (FSDestination *) createFitHorz: | (FSPDFDoc*) | document | |
page_index: | (int) | page_index | |
top: | (float) | top | |
Create a destination object for zoom mode FSDestinationZoomFitHorz.
[in] | document | A valid PDF document object. |
[in] | page_index | The index of the destination page in the PDF document. |
[in] | top | Vertical coordinate of top edge. |
+ (FSDestination *) createFitPage: | (FSPDFDoc*) | document | |
page_index: | (int) | page_index | |
Create a destination object for zoom mode FSDestinationZoomFitPage.
[in] | document | A valid PDF document object. |
[in] | page_index | The index of the destination page in the PDF document. |
+ (FSDestination *) createFitRect: | (FSPDFDoc*) | document | |
page_index: | (int) | page_index | |
left: | (float) | left | |
bottom: | (float) | bottom | |
right: | (float) | right | |
top: | (float) | top | |
Create a destination object for zoom mode FSDestinationZoomFitRect.
[in] | document | A valid PDF document object. |
[in] | page_index | The index of the destination page in the PDF document. |
[in] | left | The coordinate left of a rectangle. |
[in] | bottom | The coordinate bottom of a rectangle. |
[in] | right | The coordinate right of a rectangle. |
[in] | top | The coordinate top of a rectangle. |
+ (FSDestination *) createFitVert: | (FSPDFDoc*) | document | |
page_index: | (int) | page_index | |
left: | (float) | left | |
Create a destination object for zoom mode FSDestinationZoomFitVert.
[in] | document | A valid PDF document object. |
[in] | page_index | The index of the destination page in the PDF document. |
[in] | left | Horizontal coordinate of left edge. |
+ (FSDestination *) createFromPDFArray: | (FSPDFDoc*) | document | |
pdf_array: | (FSPDFArray*) | pdf_array | |
Create a destination object from an existing destination array.
[in] | document | A valid PDF document object. |
[in] | pdf_array | A destination PDF array. This PDF array can be retrieved from a FSPDFNameTree in type FSPDFNameTreeDests. |
+ (FSDestination *) createXYZ: | (FSPDFDoc*) | document | |
page_index: | (int) | page_index | |
left: | (float) | left | |
top: | (float) | top | |
zoom_factor: | (float) | zoom_factor | |
Create a destination object for zoom mode FSDestinationZoomXYZ.
[in] | document | A valid PDF document object. |
[in] | page_index | The index of the destination page in the PDF document. |
[in] | left | Horizontal coordinate value of a position as page's left-top position. |
[in] | top | Vertical coordinate value of a position as page's left-top position. |
[in] | zoom_factor | Zoom factor value. |
- (float) getBottom |
Get bottom position value.
This is only useful when zoom mode is FSDestinationZoomFitRect. For other zoom modes, this function will be 0.0f.
- (FSPDFArray *) getDestArray |
Get the destination PDF array.
- (float) getLeft |
Get left position value.
This is only useful when zoom mode is FSDestinationZoomXYZ, FSDestinationZoomFitVert, FSDestinationZoomFitRect or FSDestinationZoomFitBVert. Specially for FSDestinationZoomXYZ, FSDestinationZoomFitVert and FSDestinationZoomFitBVert, left value may be a null object, which means that just use current left value of application as the destination's left value. For this case, this function will return 0.0f. In order to check if the left value is just 0 or a null object, user is recommended to call function FSDestination::isLeftNull.
For other zoom modes, this function will return 0.0f.
- (int) getPageIndex: | (FSPDFDoc*) | document |
Get the index of the destination page.
[in] | document | A valid PDF document object. |
- (float) getRight |
Get right position value.
This is only useful when zoom mode is FSDestinationZoomFitRect. For other zoom modes, this function will be 0.0f.
- (float) getTop |
Get top position value.
This is only useful when zoom mode is FSDestinationZoomXYZ, FSDestinationZoomFitHorz, FSDestinationZoomFitBHorz or FSDestinationZoomFitRect. Specially for FSDestinationZoomXYZ, FSDestinationZoomFitHorz and FSDestinationZoomFitBHorz, top value may be a null object, which means that just use current top value of application as the destination's top value. For this case, this function will return 0.0f. In order to check if the left value is just 0 or a null object, user is recommended to call function FSDestination::isTopNull.
For other zoom modes, this function will return 0.0f.
- (float) getZoomFactor |
Get zoom factor.
This is only useful when zoom mode is FSDestinationZoomXYZ. For FSDestinationZoomXYZ, if the zoom factor is 0, that means just use current zoom factor of application as the destination zoom factor.
For other zoom modes, this function will be 0.0f.
- (FSDestinationZoomMode) getZoomMode |
Get the zoom mode.
- (id) initWithDest_array: | (FSPDFArray*) | dest_array |
Constructor, with a specified PDF array object.
[in] | dest_array | A PDF array object that represents destination data. |
- (id) initWithOther: | (FSDestination*) | other |
Constructor, with another destination object.
[in] | other | Another destination object. |
- (BOOL) isEmpty |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
- (BOOL) isLeftNull |
Check if left value is a null object.
This is only useful when zoom mode is FSDestinationZoomXYZ, FSDestinationZoomFitVert or FSDestinationZoomFitBVert. This function can be used to check if the left value is a null object. For other zoom modes, this function will return NO.
- (BOOL) isTopNull |
Check if top value is a null object.
This is only useful when zoom mode is FSDestinationZoomXYZ, FSDestinationZoomFitHorz, or FSDestinationZoomFitBHorz. This function can be used to check if the top value is a null object. For other zoom modes, this function will return NO.