Foxit PDF SDK
9.1
|
The page organizer delegate, which handles moving/deleting/inserting pages..etc. More...
Instance Methods | |
(BOOL) | - deletePagesAtIndexes: |
Delete the specifed pages. More... | |
(BOOL) | - flattenPageAtIndex:display:options: |
Flatten the specifed page. More... | |
(NSString *) | - getDocumentFilePath |
get file path to use in thumbnail More... | |
(BOOL) | - insertPageFromImage:atIndex: |
Insert a new page from a specified image, the image will be converted to the new page. More... | |
(BOOL) | - insertPages:pageSize:style:color:rotation:count: |
(BOOL) | - insertPages:width:height:style:color:rotation:count: |
(void) | - insertPagesFromDocument:withSourceIndexes:flags:layerName:atIndex:success:error: |
Insert multiple new pages to the current document with the pdf pages copied from the source pdf document. More... | |
(BOOL) | - movePagesFromIndexes:toIndex: |
Move the specifed pages to the destination page, the moved pages will be inserted after the destination page. More... | |
(BOOL) | - rotatePagesAtIndexes:clockwise: |
Rotate the specifed pages by 90 degree or -90 degree. More... | |
The page organizer delegate, which handles moving/deleting/inserting pages..etc.
- (BOOL) deletePagesAtIndexes: | (NSArray< NSNumber * > *) | pageIndexes |
Delete the specifed pages.
[in] | pageIndexes | The specified pages index array to be deleted. |
- (BOOL) flattenPageAtIndex: | (int) | pageIndex | |
display: | (BOOL) | display | |
options: | (FSPDFPageFlattenOptions) | options | |
Flatten the specifed page.
[in] | pageIndex | The specified page index to be flattened. |
[in] | display | Decide the purpose of the flattened result: true means the flatten result is used for display only, and false means the flatten result is used for print only. |
[in] | options | The flatten options. Please refer to values starting from FSPDFPageFlattenAll and this should one or a combination of them. Specially, if FSPDFPageFlattenNoAnnot and FSPDFPageFlattenNoFormControl are used together, that means nothing is to be flatten to page and this function will return true directly. Default value: FSPDFPageFlattenAll. |
- (NSString *) getDocumentFilePath |
get file path to use in thumbnail
- (BOOL) insertPageFromImage: | (UIImage *__nonnull) | image | |
atIndex: | (NSUInteger) | pageIndex | |
Insert a new page from a specified image, the image will be converted to the new page.
[in] | image | The specified image. |
[in] | pageIndex | The page index for new page. If parameter pageIndex is equal to or less than 0, the new page will be inserted to the first. If parameter pageIndex is equal to or larger than current page count, the new page will be inserted to the end. |
- (BOOL) insertPages: | (int) | index | |
pageSize: | (FSPDFPageSize) | pageSize | |
style: | (PDF_PAGE_STYLE_TYPE) | style | |
color: | (unsigned int) | color | |
rotation: | (FSRotation) | rotation | |
count: | (int) | count | |
Insert new blank PDF pages to document, by index.
index | A page index in current PDF document. This is used to specify where the imported pages will be inserted. If parameter index is less than 0, the new page will be inserted to the first. If parameter index is equal to or larger than current page count, the new page will be inserted to the end. |
pageSize | PageSize type of new page. Please refer to values starting from FSPDFObjC::FSPDFPageSize#FSPDFPageSizeLetterand this should be one of these values. |
style | The syle of new page.Please refer to values starting from FSPDFViewCtrl#PDF_PAGE_STYLE_TYPE_XXXand this should be one of these values. |
color | Color of new page.Format: 0xAARRGGBB. |
rotation | New page rotation value. Please refer to values starting from FSPDFObjC::FSRotation#FSRotation0 and this should be one of these values except FSPDFObjC::FSRotation#FSRotationUnknown |
count | The count of new pages to be inserted(count is greater than 0). |
YES
means success, while NO
means failure. - (BOOL) insertPages: | (int) | index | |
width: | (float) | width | |
height: | (float) | height | |
style: | (PDF_PAGE_STYLE_TYPE) | style | |
color: | (unsigned int) | color | |
rotation: | (FSRotation) | rotation | |
count: | (int) | count | |
Insert new blank PDF pages to document, by index.
index | A page index in current PDF document. This is used to specify where the imported pages will be inserted. If parameter index is less than 0, the new page will be inserted to the first. If parameter index is equal to or larger than current page count, the new page will be inserted to the end. |
width | Width of new page (unit is 1/72 inch,width is greater than 0). |
height | Height of new page (unit is 1/72 inch,height is greater than 0). |
style | The syle of new page.Please refer to values starting from FSPDFViewCtrl#PDF_PAGE_STYLE_TYPE_XXXand this should be one of these values. |
color | Color of new page.Format: 0xAARRGGBB. |
rotation | New page rotation value. Please refer to values starting from FSPDFObjC::FSRotation#FSRotation0 and this should be one of these values except FSPDFObjC::FSRotation#FSRotationUnknown |
count | The count of new pages to be inserted(count is greater than 0). |
YES
means success, while NO
means failure. - (void) insertPagesFromDocument: | (FSPDFDoc *) | document | |
withSourceIndexes: | (NSArray< NSNumber * > *) | sourcePagesIndexes | |
flags: | (FSPDFDocImportPageFlags) | flags | |
layerName: | (NSString *_Nullable) | layerName | |
atIndex: | (NSUInteger) | destinationIndex | |
success: | (void(^)(NSString *result)) | success | |
error: | (void(^)(NSString *errorInfo)) | error | |
Insert multiple new pages to the current document with the pdf pages copied from the source pdf document.
[in] | document | The source pdf document. |
[in] | sourcePagesIndexes | The specified pages index array to be copied. |
[in] | flags | Options for importing pages. Please refer to FSPDFDocImportPageFlags::FSPDFDocImportFlagXXX and this can be one or a combination of them. |
[in] | layerName | The name of non-selectable label or the prefix name of the non-selectable label to be shown in layer panel of application, in UTF-8 encoding. If parameter flags contains FSPDFDocImportPageFlags::FSPDFDocImportFlagWithLayers, this should not be empty and should be a valid string. If parameter flags does not contain FSPDFDocImportPageFlags::FSPDFDocImportFlagWithLayers, this string will be ignored.
|
[in] | pageIndex | The specified page to be inserted before. If parameter pageIndex is equal to or less than 0, the new page will be inserted to the first. If parameter pageIndex is equal to or larger than current page count, the new page will be inserted to the end. |
[in] | success | The callback will be called when the page insertion is successful. |
[in] | error | The callback will be called when page insertion fails and error message info is thrown. |
- (BOOL) movePagesFromIndexes: | (NSArray< NSNumber * > *) | sourcePageIndexes | |
toIndex: | (NSUInteger) | pageIndex | |
Move the specifed pages to the destination page, the moved pages will be inserted after the destination page.
[in] | sourcePageIndexes | The specified pages index array to be moved. |
[in] | pageIndex | The page index to be inserted before. |
- (BOOL) rotatePagesAtIndexes: | (NSArray< NSNumber * > *) | pageIndexes | |
clockwise: | (BOOL) | clockwise | |
Rotate the specifed pages by 90 degree or -90 degree.
[in] | pageIndexes | The specified pages index array to be rotated. |
[in] | clockwise | If yes, the pages will be rotated by 90 degree, if no, the pages will be rotated by -90 degree. |