Foxit PDF SDK
|
Instance Methods | |
(unsigned int) | - addIndirectObject: |
Add a PDF object to current PDF document, to be an indirect object. More... | |
(FSPDFDocPasswordType) | - checkPassword: |
Check the type of a specified password. More... | |
(void) | - clearRenderCache |
Clear the cache used during rendering, to reduce the memory usage. More... | |
(FSBookmark *) | - createRootBookmark |
Create new bookmark root node. More... | |
(void) | - deleteIndirectObject: |
Delete an indirect object by indirect object number. More... | |
(BOOL) | - doJSOpenAction |
Perform JavaScript actions when the document is opened. More... | |
(BOOL) | - exportAnnotToFDF:fdf_doc: |
Export specified annotation to a FDF/XFDF document. More... | |
(BOOL) | - exportToFDF:types:page_range: |
Export form fields and annotations to a FDF/XFDF document. More... | |
(FSPDFDictionary *) | - getCatalog |
Get the catalog dictionary. More... | |
(FSCertificateEncryptData *) | - getCertificateEncryptData |
Get encrypt data of certificate encryption. More... | |
(FSCustomEncryptData *) | - getCustomEncryptData |
Get encrypt data of custom encryption. More... | |
(NSString *) | - getDocURI |
Get the URI of connected PDF if current PDF is a connected PDF. More... | |
(FSDRMEncryptData *) | - getDRMEncryptData |
Get encrypt data of Foxit DRM encryption. More... | |
(FSPDFDictionary *) | - getEncryptDict |
Get the encrypt dictionary. More... | |
(FSPDFDocEncryptType) | - getEncryptionType |
Get the encryption type. More... | |
(NSString *) | - getEndpoint |
Get the URL of ConnectedPDF Web services if current PDF is a connected PDF. More... | |
(unsigned long long) | - getFileSize |
Get file size. More... | |
(int) | - getFirstAvailPageIndex |
Get the page index of the fist available page. More... | |
(FSFont *) | - getFont: |
Get a font by index. More... | |
(int) | - getFontCount |
Count all the PDF fonts used in current PDF document. More... | |
(NSString *) | - getHeader |
Get PDF header identifying the version of the PDF specification to which the file conforms. More... | |
(FSPDFObject *) | - getIndirectObject: |
Get an indirect object by indirect object number. More... | |
(FSPDFDictionary *) | - getInfo |
Get the information dictionary. More... | |
(FSAction *) | - getOpenAction |
Get the action to be performed when the document is opened. More... | |
(FSPDFPage *) | - getPage: |
Get a PDF page by index. More... | |
(FSPageBasicInfo *) | - getPageBasicInfo: |
Get the basic information of a page specified by index. More... | |
(int) | - getPageCount |
Get the count of pages. More... | |
(FSPDFDictionary *) | - getPagesDict |
Get the dictionary of "Pages". More... | |
(FSPDFDocPasswordType) | - getPasswordType |
Get the type of current used password. More... | |
(FSPayLoadData *) | - getPayLoadData |
Get payload data if current document's wrapper type is FSPDFDocWrapperPDFV2. More... | |
(FSReadingBookmark *) | - getReadingBookmark: |
Get a reading bookmark by index. More... | |
(int) | - getReadingBookmarkCount |
Get the count of reading bookmarks. More... | |
(FSRMSEncryptData *) | - getRMSEncryptData |
Get encrypt data of RMS encryption. More... | |
(FSBookmark *) | - getRootBookmark |
Get bookmark root node. More... | |
(FSSecurityHandler *) | - getSecurityHandler |
Get current PDF security handler of current document. More... | |
(FSSignature *) | - getSignature: |
Get a signature by index. More... | |
(int) | - getSignatureCount |
Get the count of signature. More... | |
(FSStdEncryptData *) | - getStdEncryptData |
Get encrypt data of standard encryption (known as password encryption). More... | |
(FSPDFDictionary *) | - getTrailer |
Get the trailer dictionary. More... | |
(NSString *) | - getUserPassword: |
Get the user password based on owner password. More... | |
(unsigned int) | - getUserPermissions |
Get user access permissions. More... | |
(FSWrapperData *) | - getWrapperData |
Get wrapper data if current document's wrapper type is FSPDFDocWrapperFoxit. More... | |
(long long) | - getWrapperOffset |
Get wrapper offset if current document's wrapper type is FSPDFDocWrapperFoxit. More... | |
(FSPDFDocWrapperType) | - getWrapperType |
Get Wrapper type. More... | |
(BOOL) | - hasForm |
Check whether current PDF document has interactive form (also known as AcroForm). More... | |
(BOOL) | - importFromFDF:types:page_range: |
Import form fields and annotations from a FDF/XFDF document. More... | |
(id) | - init |
Constructor. More... | |
(id) | - initWithBuffer: |
Constructor, from a memory buffer. More... | |
(id) | - initWithFile_read:is_async: |
Constructor, with a file read callback object. More... | |
(id) | - initWithOther: |
Constructor, with another PDF document object. More... | |
(id) | - initWithPath: |
Constructor, from an existing PDF file path. More... | |
(FSPDFPage *) | - insertPage:width:height: |
Insert a new blank PDF page to document, by index. More... | |
(FSPDFPage *) | - insertPageWithType:size: |
Insert a new blank PDF page to document, by index. More... | |
(FSReadingBookmark *) | - insertReadingBookmark:title:dest_page_index: |
Insert a reading bookmark to current PDF document. More... | |
(BOOL) | - isCDRM |
Check whether the loaded document is a ConnectedPDF DRM document or not. More... | |
(BOOL) | - isCPDF |
Check whether the loaded document is a ConnectedPDF document or not. More... | |
(BOOL) | - isEmpty |
Check whether current object is empty or not. More... | |
(BOOL) | - isEncrypted |
Check whether current document is an encrypted file or not. More... | |
(BOOL) | - isLinearized |
Check if current PDF document is a linearized file. More... | |
(BOOL) | - isPortfolio |
Check whether current PDF document is a portfolio file or not. More... | |
(BOOL) | - isTaggedPDF |
Check if current PDF document is a Tagged PDF file. More... | |
(BOOL) | - isWrapper |
Check whether current document is a wrapper file or not. More... | |
(BOOL) | - isXFA |
Check whether current PDF document is an XFA document. More... | |
(FSErrorCode) | - load: |
Load current document content by using a specified password. More... | |
(FSErrorCode) | - loadW: |
Load current document content by using a specified password. More... | |
(BOOL) | - movePagesTo:dest_index: |
Move one or more pages (specified by index) to a new index position. More... | |
(BOOL) | - movePageTo:dest_index: |
Move a specified page to a new index position. More... | |
(BOOL) | - removeBookmark: |
Remove a specified bookmark. More... | |
(BOOL) | - removeOpenAction |
Remove the action to be performed when the document is opened. More... | |
(BOOL) | - removePage: |
Remove a PDF page by page index. More... | |
(BOOL) | - removePageWithPDFPage: |
Remove a specified PDF page. More... | |
(BOOL) | - removeReadingBookmark: |
Remove a reading bookmark from current PDF document. More... | |
(BOOL) | - removeSecurity |
Remove the security handler from current document, so that the later saved document will be unencrypted. More... | |
(void) | - removeSignature: |
Remove a signature. More... | |
(BOOL) | - saveAs:save_flags: |
Save current PDF document as another PDF file. More... | |
(BOOL) | - saveAsWrapperFile:wrapper_data:user_permissions:owner_password: |
Save current PDF document as a wrapper file. More... | |
(BOOL) | - setOpenAction: |
Set the action to be performed when the document is opened. More... | |
(BOOL) | - setSecurityHandler: |
Set a PDF security handler for encryption, such as standard encryption(password), certificate encryption, and so on. More... | |
(FSProgressive *) | - startGetPayloadFile:pause: |
Start to get payload file. More... | |
(FSProgressive *) | - startImportPages:src_doc:flags:layer_name:page_range:pause: |
Start to import pages from another PDF document (via PDF document object). More... | |
(FSProgressive *) | - startImportPagesFromFilePath:src_file_path:password:flags:layer_name:page_range:pause: |
Start to import pages from another PDF document (via file path). More... | |
(FSProgressive *) | - startLoad:is_cache_stream:pause: |
Start to loading current document content by using a specified password. More... | |
(FSProgressive *) | - startLoadW:is_cache_stream:pause: |
Start to loading current document content by using a specified password. More... | |
(FSProgressive *) | - startSaveAs:save_flags:pause: |
Start to save current PDF document as another PDF file. More... | |
(FSProgressive *) | - startSaveAsPayloadFile:payload_file_path:crypto_filter:description:version:save_flags:pause: |
Start to save current PDF document as a wrapper document with a payload document (defined in PDF 2.0). More... | |
(FSProgressive *) | - startSaveAsWithWriterCallback:save_flags:pause: |
Start to save current PDF document as another PDF file. More... | |
Properties | |
FSPDFDocDisplayMode | displayMode |
Get or Set the display mode. More... | |
int | fileVersion |
Get or Set PDF file version stored in PDF header section. | |
A PDF document object can be constructed with an existing PDF file from file path, memory buffer, a custom implemented FSFileReaderCallback object and an input file stream. And then call function FSPDFDoc::load: or FSPDFDoc::startLoad:is_cache_stream:pause: to load document content. This class offers functions to retrieve different part of a PDF document. For example:
This class also offers functions for features, such as saving current document as another PDF file, importing pages from another PDF file, setting security handler in order to save encrypted PDF file, and so on.
This class object can also be used to construct objects of other classes in order to access specified information in PDF document:
- (unsigned int) addIndirectObject: | (FSPDFObject*) | pdf_object |
Add a PDF object to current PDF document, to be an indirect object.
[in] | pdf_object | A FSPDFObject object. It should not be nil. |
- (FSPDFDocPasswordType) checkPassword: | (NSString *) | password |
Check the type of a specified password.
This function can be used to check the type of any password string, including the password string used for loading document content.
[in] | password | A password string to be detected. |
- (void) clearRenderCache |
Clear the cache used during rendering, to reduce the memory usage.
- (FSBookmark *) createRootBookmark |
Create new bookmark root node.
If current PDF document already has the bookmark root node, this function will remove the old bookmark tree and create a new root node instead.
- (void) deleteIndirectObject: | (unsigned int) | object_number |
Delete an indirect object by indirect object number.
[in] | object_number | The indirect object number. It should be above 0. |
- (BOOL) doJSOpenAction |
Perform JavaScript actions when the document is opened.
Export specified annotation to a FDF/XFDF document.
[in] | pdf_annot | A valid PDF annotation object to be exported to the FDF/XFDF document. |
[in] | fdf_doc | A valid FDF/XFDF document object, to which the specified annotation will be exported. |
Export form fields and annotations to a FDF/XFDF document.
For more details about the type of PDF object available for exporting, please refer to Page 22 of "XML Forms Data
Format Specification".
[in] | fdf_doc | A valid FDF/XFDF document object, to which form fields and annotations will be exported. |
[in] | types | Used to decide which kind of data will be exported. Please refer to values starting from FSPDFDocForms and this can be one or a combination of these values. |
[in] | page_range | A range object that specifies some pages. Data (in specified types) in these pages will be exported to FDF/XFDF document. If this range object is constructed by default constructor and not set any value, that means all the data (in specified types) of current document will be exported to FDF/XFDF document. This parameter is only useful when parameter types contains FSPDFDocAnnots. |
- (FSPDFDictionary *) getCatalog |
Get the catalog dictionary.
- (FSCertificateEncryptData *) getCertificateEncryptData |
Get encrypt data of certificate encryption.
This function is useful when current document is encrypted by certificate.
- (FSCustomEncryptData *) getCustomEncryptData |
Get encrypt data of custom encryption.
This function is useful when current document is encrypted by custom.
- (NSString *) getDocURI |
Get the URI of connected PDF if current PDF is a connected PDF.
- (FSDRMEncryptData *) getDRMEncryptData |
Get encrypt data of Foxit DRM encryption.
This function is useful when current document is encrypted by Foxit DRM.
- (FSPDFDictionary *) getEncryptDict |
Get the encrypt dictionary.
- (FSPDFDocEncryptType) getEncryptionType |
Get the encryption type.
- (NSString *) getEndpoint |
Get the URL of ConnectedPDF Web services if current PDF is a connected PDF.
- (unsigned long long) getFileSize |
Get file size.
- (int) getFirstAvailPageIndex |
Get the page index of the fist available page.
This is useful for a linearized PDF document because in a linearized PDF document the first available page may not be the first page.
This function can be used only when document is loaded successfully.
- (FSFont *) getFont: | (int) | index |
Get a font by index.
[in] | index | The index of PDF font. Valid range: from 0 to (count-1). count is returned by function FSPDFDoc::getFontCount. |
- (int) getFontCount |
Count all the PDF fonts used in current PDF document.
This function will enumerate all the font resources used for pages, annotations, and interactive form.
- (NSString *) getHeader |
Get PDF header identifying the version of the PDF specification to which the file conforms.
- (FSPDFObject *) getIndirectObject: | (unsigned int) | object_number |
Get an indirect object by indirect object number.
[in] | object_number | The indirect object number. It should be above 0. |
- (FSPDFDictionary *) getInfo |
Get the information dictionary.
Document's information dictionary contains metadata for the document.
- (FSAction *) getOpenAction |
Get the action to be performed when the document is opened.
- (FSPDFPage *) getPage: | (int) | index |
Get a PDF page by index.
If current PDF document object is constructed with an AsyncReaderCallback which means to do asynchronous loading, this function may throw exception FSErrDataNotReady. In this case, user should prepare data for specified range informed by callback function FSAsyncReaderCallback::addDownloadHint:size: and then call this function again.
[in] | index | The page index. Valid range: from 0 to (count-1). count is returned by function FSPDFDoc::getPageCount. |
- (FSPageBasicInfo *) getPageBasicInfo: | (int) | index |
Get the basic information of a page specified by index.
This function can quickly get the basic information of a PDF page without getting that PDF page object. If current PDF document object is constructed with an AsyncReaderCallback which means to do asynchronous loading, this function may throw exception FSErrDataNotReady. In this case, user should prepare data for specified range informed by callback function FSAsyncReaderCallback::addDownloadHint:size: and then call this function again.
[in] | index | The page index. Valid range: from 0 to (count-1). count is returned by function FSPDFDoc::getPageCount. |
- (int) getPageCount |
Get the count of pages.
- (FSPDFDictionary *) getPagesDict |
Get the dictionary of "Pages".
- (FSPDFDocPasswordType) getPasswordType |
Get the type of current used password.
This function is useful after loading a PDF document, in order to get the type of the password which was used in the loading process.
If current document is a new one (not loading from existed PDF file), this function will return FSPDFDocPwdNoPassword.
If current document is constructed from an existing file but has not been loaded yet, this function will return FSPDFDocPwdInvalid.
- (FSPayLoadData *) getPayLoadData |
Get payload data if current document's wrapper type is FSPDFDocWrapperPDFV2.
- (FSReadingBookmark *) getReadingBookmark: | (int) | index |
Get a reading bookmark by index.
[in] | index | The index of reading bookmarks. Valid range: from 0 to (count-1). count is returned by function FSPDFDoc::getReadingBookmarkCount. |
- (int) getReadingBookmarkCount |
Get the count of reading bookmarks.
- (FSRMSEncryptData *) getRMSEncryptData |
Get encrypt data of RMS encryption.
This function is useful when current document is encrypted by RMS.
- (FSBookmark *) getRootBookmark |
Get bookmark root node.
- (FSSecurityHandler *) getSecurityHandler |
Get current PDF security handler of current document.
- (FSSignature *) getSignature: | (int) | index |
Get a signature by index.
[in] | index | The index of signature. Valid range: from 0 to (count-1). count is returned by function FSPDFDoc::getSignatureCount. |
- (int) getSignatureCount |
Get the count of signature.
- (FSStdEncryptData *) getStdEncryptData |
Get encrypt data of standard encryption (known as password encryption).
This function is useful when current document is encrypted by password.
- (FSPDFDictionary *) getTrailer |
Get the trailer dictionary.
- (NSString *) getUserPassword: | (NSString *) | owner_password |
Get the user password based on owner password.
This function is useful when current document is encrypted by password.
[in] | owner_password | Owner password string. |
- (unsigned int) getUserPermissions |
Get user access permissions.
- (FSWrapperData *) getWrapperData |
Get wrapper data if current document's wrapper type is FSPDFDocWrapperFoxit.
- (long long) getWrapperOffset |
Get wrapper offset if current document's wrapper type is FSPDFDocWrapperFoxit.
- (FSPDFDocWrapperType) getWrapperType |
Get Wrapper type.
- (BOOL) hasForm |
Check whether current PDF document has interactive form (also known as AcroForm).
If current PDF document object is constructed with an AsyncReaderCallback which means to do asynchronous loading, this function may throw exception FSErrDataNotReady. In this case, user should prepare data for specified range informed by callback function FSAsyncReaderCallback::addDownloadHint:size: and then call this function again.
Import form fields and annotations from a FDF/XFDF document.
For more details about the type of PDF object available for exporting, please refer to Page 22 of "XML Forms Data
Format Specification".
[in] | fdf_doc | A valid FDF/XFDF document object, from which form fields and annotations will be imported. |
[in] | types | Used to decide which kind of data will be imported. Please refer to values starting from FSPDFDocForms and this can be one or a combination of these values. |
[in] | page_range | A range object that specifies some pages. Data (in specified types) from FDF/XFDF document will be imported to these specified pages. If this range object is constructed by default constructor and not set any value, that means data (in specified types) from FDF/XFDF document will be imported to related PDF pages whose index have been defined in FDF/XFDF document. This parameter is only useful when parameter types contains FSPDFDocAnnots. |
- (id) init |
Constructor.
This constructor is to construct a new PDF document (without any data). The file version value would be 17 (as PDF version 1.7) by default.
- (id) initWithBuffer: | (NSData *) | buffer |
Constructor, from a memory buffer.
After constructing such a PDF document object, please ensure the document object has been loaded before using most functions in class FSPDFDoc .
[in] | buffer | A memory buffer, containing the serialized document. The PDF document data should be fully loaded in this memory buffer. It should not be nil. |
- (id) initWithFile_read: | (id<FSFileReaderCallback>) | file_read | |
is_async: | (BOOL) | is_async | |
Constructor, with a file read callback object.
After constructing such a PDF document object, please ensure the document object has been loaded before using most functions in class FSPDFDoc .
[in] | file_read | A FSFileReaderCallback object which is implemented by user to load a PDF document. It should not be nil. If the input callback object is an FSAsyncReaderCallback object, and is_async is YES that means the PDF document will be loaded by asynchronous method; otherwise, the document will be loaded in common way. |
[in] | is_async | Whether the input FSFileReaderCallback object is for asynchronously loading or not. Default value: NO. |
- (id) initWithOther: | (FSPDFDoc*) | other |
Constructor, with another PDF document object.
[in] | other | Another PDF document object. |
- (id) initWithPath: | (NSString *) | path |
Constructor, from an existing PDF file path.
After constructing such a PDF document object, please ensure the document object has been loaded before using most functions in class FSPDFDoc .
[in] | path | A full path of an existing PDF file. It should not be an empty string. |
- (FSPDFPage *) insertPage: | (int) | index | |
width: | (float) | width | |
height: | (float) | height | |
Insert a new blank PDF page to document, by index.
[in] | index | The page index for new page. 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. |
[in] | width | Width of new page (unit is 1/72 inch). |
[in] | height | Height of new page (unit is 1/72 inch). |
- (FSPDFPage *) insertPageWithType: | (int) | index | |
size: | (FSPDFPageSize) | size | |
Insert a new blank PDF page to document, by index.
[in] | index | The page index for new page. 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. |
[in] | size | Size type of new page. Please refer to values starting from FSPDFPageSizeLetter and this should be one of these values. |
- (FSReadingBookmark *) insertReadingBookmark: | (int) | reading_bookmark_index | |
title: | (NSString *) | title | |
dest_page_index: | (int) | dest_page_index | |
Insert a reading bookmark to current PDF document.
[in] | reading_bookmark_index | A reading bookmark index. If reading_bookmark_index is less than 0, the new reading bookmark will be inserted to the first. If reading_bookmark_index is equal to or larger than the count of reading bookmarks, the new reading bookmark will be inserted to the end. |
[in] | title | Title string for new reading bookmark and should not an empty string. |
[in] | dest_page_index | The index of destination page. |
- (BOOL) isCDRM |
Check whether the loaded document is a ConnectedPDF DRM document or not.
- (BOOL) isCPDF |
Check whether the loaded document is a ConnectedPDF document or not.
- (BOOL) isEmpty |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
- (BOOL) isEncrypted |
Check whether current document is an encrypted file or not.
- (BOOL) isLinearized |
Check if current PDF document is a linearized file.
- (BOOL) isPortfolio |
Check whether current PDF document is a portfolio file or not.
- (BOOL) isTaggedPDF |
Check if current PDF document is a Tagged PDF file.
- (BOOL) isWrapper |
Check whether current document is a wrapper file or not.
- (BOOL) isXFA |
Check whether current PDF document is an XFA document.
Currently, Foxit PDF SDK does not fully support XFA document. When loading an XFA document, Foxit PDF SDK may only load the XFA wrapper level, and cannot have access to the real XFA content. Foxit PDF SDK does not support to insert/import/remove/move pages in an XFA document yet.
- (FSErrorCode) load: | (NSString *) | password |
Load current document content by using a specified password.
If current PDF document object is constructed with an AsyncReaderCallback which means to do asynchronous loading, this function may return FSErrDataNotReady. In this case, user should prepare data for specified range informed by callback function FSAsyncReaderCallback::addDownloadHint:size: and then call this function again.
[in] | password | The password string, used to load current document content. The password can be either user password or owner password. If current document is not encrypted by password, just pass an empty string. |
- (FSErrorCode) loadW: | (NSString *) | password |
Load current document content by using a specified password.
If current PDF document object is constructed with an AsyncReaderCallback which means to do asynchronous loading, this function may return FSErrDataNotReady. In this case, user should prepare data for specified range informed by callback function FSAsyncReaderCallback::addDownloadHint:size: and then call this function again.
[in] | password | The password string, used to load current document content. The password can be either user password or owner password. If current document is not encrypted by password, just pass an empty string. |
- (BOOL) movePagesTo: | (FSRange*) | page_range | |
dest_index: | (int) | dest_index | |
Move one or more pages (specified by index) to a new index position.
If move only one page, this function just has the same feature as function FSPDFDoc::movePageTo:dest_index:.
If move more than one page, these page will keep the order defined in parameter page_range and be moved to the destination index position as a whole.
After this function is successful, indexes of moved pages will be changed and indexes of the rest pages may be affected as well.
[in] | page_range | A range object which should at least contain one valid range. All the related pages will keep the order (specified by this range) and be moved as a whole. If there exist duplicated indexes in the range, only the last occurrence will be useful. |
[in] | dest_index | Index of the destination position, based on current page array. Valid range: from 0 to (count-1). count is returned by function FSPDFDoc::getPageCount. |
- (BOOL) movePageTo: | (FSPDFPage*) | page | |
dest_index: | (int) | dest_index | |
Move a specified page to a new index position.
If the specified page is successfully moved to the new index position, page index of all the pages between the new index and old index of the specified page will be changed as well.
[in] | page | A PDF page to be moved. It should be in current PDF document. |
[in] | dest_index | Index of the destination position in page array. Valid range: from 0 to (count-1). count is returned by function FSPDFDoc::getPageCount. If parameter dest_index is just the same as the page index of parameter page, no change will be done and this function will return YES directly. |
- (BOOL) removeBookmark: | (FSBookmark*) | bookmark |
Remove a specified bookmark.
[in] | bookmark | The valid bookmark that would be deleted. |
- (BOOL) removeOpenAction |
Remove the action to be performed when the document is opened.
- (BOOL) removePage: | (int) | index |
Remove a PDF page by page index.
[in] | index | The page index. Valid range: from 0 to (count-1). count is returned by function FSPDFDoc::getPageCount. |
- (BOOL) removePageWithPDFPage: | (FSPDFPage*) | page |
Remove a specified PDF page.
Once the specified PDF page is removed successfully, the page object cannot be used any more.
[in] | page | A PDF page object that represents the PDF page to be removed. The page should be in current PDF document. |
- (BOOL) removeReadingBookmark: | (FSReadingBookmark*) | reading_bookmark |
Remove a reading bookmark from current PDF document.
[in] | reading_bookmark | A valid reading bookmark to be removed. |
- (BOOL) removeSecurity |
Remove the security handler from current document, so that the later saved document will be unencrypted.
- (void) removeSignature: | (FSSignature*) | signature |
Remove a signature.
[in] | signature | A valid signature to be removed. |
- (BOOL) saveAs: | (NSString *) | file_path | |
save_flags: | (unsigned int) | save_flags | |
Save current PDF document as another PDF file.
If current document is loaded from an existing PDF file and a different file version has been set by FSPDFDoc::fileVersion before saving, Foxit PDF SDK will ignore FSPDFDocSaveFlagIncremental in parameter save_flags and use the file version in saved PDF file.
[in] | file_path | A full path for the new saved PDF file. It should not be an empty string. |
[in] | save_flags | Document saving flags. Please refer to values starting from FSPDFDocSaveFlagNormal and this can be one or combination of these values. |
- (BOOL) saveAsWrapperFile: | (NSString *) | file_path | |
wrapper_data: | (FSWrapperData*) | wrapper_data | |
user_permissions: | (unsigned int) | user_permissions | |
owner_password: | (NSString *) | owner_password | |
Save current PDF document as a wrapper file.
PDF wrapper is an extended standard, and it helps to hint some information to viewers.
PDF wrapper consists of
This function uses the current size of file which is specified by file_path to set wrapper offset.
[in] | file_path | A full path of a PDF file. Current PDF document will be saved into this PDF file as a wrapper file. |
[in] | wrapper_data | Wrapper data. If this is nil, no wrapper data is used. |
[in] | user_permissions | User permissions for the wrapper document. Pass 0xFFFFFFFC if no special permissions is needed. Please refer to values starting from FSPDFDocPermPrint and this should be one or combination of these values. Default value: 0xFFFFFFFC. |
[in] | owner_password | Owner password. If this is an empty string, parameter user_permissions will be ignored. |
- (BOOL) setOpenAction: | (FSAction*) | action |
Set the action to be performed when the document is opened.
[in] | action | A valid action to be set. Currently only support following types as the new action: FSActionTypeGoto, FSActionTypeURI, FSActionTypeJavaScript, FSActionTypeNamed, FSActionTypeSubmitForm, FSActionTypeResetForm, FSActionTypeHide, FSActionTypeImportData. |
- (BOOL) setSecurityHandler: | (FSSecurityHandler*) | handler |
Set a PDF security handler for encryption, such as standard encryption(password), certificate encryption, and so on.
[in] | handler | A PDF security handler object. |
- (FSProgressive *) startGetPayloadFile: | (id<FSFileWriterCallback>) | payload_file | |
pause: | (id<FSPauseCallback>) | pause | |
Start to get payload file.
It may take a long time to getting payload document, so this function uses a progressive process to do this.
[in] | payload_file | A WriterCallback callback object. User should implement the callback function in this callback object in order that this callback object can be used to save payload file. |
[in] | pause | Pause callback object which decides if the parsing process needs to be paused. This can be nil which means not to pause during the parsing process. If this is not nil, it should be a valid pause object implemented by user. |
- (FSProgressive *) startImportPages: | (int) | dest_index | |
src_doc: | (FSPDFDoc*) | src_doc | |
flags: | (unsigned int) | flags | |
layer_name: | (NSString *) | layer_name | |
page_range: | (FSRange*) | page_range | |
pause: | (id<FSPauseCallback>) | pause | |
Start to import pages from another PDF document (via PDF document object).
It may take a long time to importing pages, so Foxit PDF SDK uses a progressive process to do this.
Signed signatures in the pages of source PDF document will not be imported into current PDF document.
Currently, if either current PDF document or the source PDF document contains XFA, not support to do the importing.
[in] | dest_index | A page index in current PDF document. This is used to specify where the imported pages will be inserted: If parameter dest_index is less than 0, the imported pages will be inserted to the first. If parameter dest_index is equal to or larger than current page count, the imported pages will be inserted to the end. |
[in] | src_doc | A PDF document object which is the source PDF document. Pages in this document will be imported to current PDF document. Please keep this source PDF document object valid until current document will not be saved any more or is closed. |
[in] | flags | Options for importing pages. Please refer to values starting from FSPDFDocImportFlagNormal and this can be one or a combination of these macros. |
[in] | layer_name | The name of non-selectable label or the prefix name of the non-selectable label to be shown in layer panel of application. If parameter flags contains FSPDFDocImportFlagWithLayers, this should not be empty and should be a valid string. If parameter flags does not contain FSPDFDocImportFlagWithLayers, this string will be ignored.
|
[in] | page_range | A range object to specify which pages is to be inserted. If this range object is constructed by default constructor and not set any value, all pages in the source document will be imported. |
[in] | pause | Pause object which decides if the importing process needs to be paused. This can be nil which means not to pause during the parsing process. If this is not nil, it should be a valid pause object implemented by user. |
- (FSProgressive *) startImportPagesFromFilePath: | (int) | dest_index | |
src_file_path: | (NSString *) | src_file_path | |
password: | (NSString *) | password | |
flags: | (unsigned int) | flags | |
layer_name: | (NSString *) | layer_name | |
page_range: | (FSRange*) | page_range | |
pause: | (id<FSPauseCallback>) | pause | |
Start to import pages from another PDF document (via file path).
It may take a long time to importing pages, so Foxit PDF SDK uses a progressive process to do this.
Signed signatures in the pages of source PDF document will not be imported into current PDF document.
Currently, Foxit PDF SDK does not support to do the importing if either current PDF document or the source PDF document contains XFA.
[in] | dest_index | A page index in current PDF document. This is used to specify where the imported pages will be inserted. If parameter dest_index is less than 0, the imported pages will be inserted to the first. If parameter dest_index is equal to or larger than current page count, the imported pages will be inserted to the end. |
[in] | src_file_path | A full path of an existing PDF file as the source PDF document Some pages will be imported from this PDF file to current PDF document. |
[in] | password | A password string used to load source PDF document content. The password can be either user password or owner password. If source PDF document is not encrypted by password, just pass an empty string. |
[in] | flags | Options for importing pages. Please refer to values starting from FSPDFDocImportFlagNormal and this can be one or a combination of these values. |
[in] | layer_name | The name of non-selectable label or the prefix name of the non-selectable label to be shown in layer panel of application. If parameter flags contains FSPDFDocImportFlagWithLayers, this should not be empty and should be a valid string. If parameter flags does not contain FSPDFDocImportFlagWithLayers, this string will be ignored.
|
[in] | page_range | A range object to specify which pages is to be imported. If this range object is constructed by default constructor and not set any value, all pages in the source document will be imported. |
[in] | pause | Pause object which decides if the importing process needs to be paused. This can be nil which means not to pause during the parsing process. If this is not nil, it should be a valid pause object implemented by user. |
- (FSProgressive *) startLoad: | (NSString *) | password | |
is_cache_stream: | (BOOL) | is_cache_stream | |
pause: | (id<FSPauseCallback>) | pause | |
Start to loading current document content by using a specified password.
It may take a long time to loading document content, so this function uses a progressive process to do this.
When using this function, parameter is_cache_stream can be used to decide whether to load stream content into memory or not:
[in] | password | A password string, used to load current document content. The password can be either user password or owner password. If current document is not encrypted by password, just pass an empty string. |
[in] | is_cache_stream | YES means to load stream content into memory, and NO means not to load stream content into memory and just leave stream content on file system and read them when needed. Please refer to "Details" part about the difference between these two modes. |
[in] | pause | Pause object which decides if the importing process needs to be paused. This can be nil which means not to pause during the parsing process. If this is not nil, it should be a valid pause object implemented by user. |
- (FSProgressive *) startLoadW: | (NSString *) | password | |
is_cache_stream: | (BOOL) | is_cache_stream | |
pause: | (id<FSPauseCallback>) | pause | |
Start to loading current document content by using a specified password.
It may take a long time to loading document content, so this function uses a progressive process to do this.
When using this function, parameter is_cache_stream can be used to decide whether to load stream content into memory or not:
[in] | password | A password string, used to load current document content. The password can be either user password or owner password. If current document is not encrypted by password, just pass an empty string. |
[in] | is_cache_stream | YES means to load stream content into memory, and NO means not to load stream content into memory and just leave stream content on file system and read them when needed. Please refer to "Details" part about the difference between these two modes. |
[in] | pause | Pause object which decides if the importing process needs to be paused. This can be nil which means not to pause during the parsing process. If this is not nil, it should be a valid pause object implemented by user. |
- (FSProgressive *) startSaveAs: | (NSString *) | file_path | |
save_flags: | (unsigned int) | save_flags | |
pause: | (id<FSPauseCallback>) | pause | |
Start to save current PDF document as another PDF file.
It may take a long time to saving PDF document, so this function uses a progressive process to do this.
If current document is loaded from an existing PDF file and a different file version has been set by FSPDFDoc::fileVersion before saving, Foxit PDF SDK will ignore FSPDFDocSaveFlagIncremental in parameter save_flags and use the file version in saved PDF file.
[in] | file_path | A full path for the new saved PDF file. It should not be an empty string. |
[in] | save_flags | Document saving flags. Please refer to values starting from FSPDFDocSaveFlagNormal and this can be one or combination of these values. |
[in] | pause | Pause callback object which decides if the parsing process needs to be paused. This can be nil which means not to pause during the parsing process. If this is not nil, it should be a valid pause object implemented by user. |
- (FSProgressive *) startSaveAsPayloadFile: | (NSString *) | file_path | |
payload_file_path: | (NSString *) | payload_file_path | |
crypto_filter: | (NSString *) | crypto_filter | |
description: | (NSString *) | description | |
version: | (float) | version | |
save_flags: | (unsigned int) | save_flags | |
pause: | (id<FSPauseCallback>) | pause | |
Start to save current PDF document as a wrapper document with a payload document (defined in PDF 2.0).
It may take a long time to saving PDF document, so this function uses a progressive process to do this.
If current document is loaded from an existing PDF file and a different file version has been set by FSPDFDoc::fileVersion before saving, Foxit PDF SDK will ignore FSPDFDocSaveFlagIncremental in parameter save_flags and use the file version in saved PDF file.
[in] | file_path | A full path for the new saved PDF file. It should not be an empty string. |
[in] | payload_file_path | A full path of a PDF document which will be used as payload document. It should not be an empty string. |
[in] | crypto_filter | The name of the cryptographic filter used to encrypt the encrypted payload document. |
[in] | description | Description for wrapper file to show applications or confront users prompt information. |
[in] | version | The version number of the cryptographic filter used to encrypt the encrypted payload referenced by this dictionary. |
[in] | save_flags | Document saving flags. Please refer to values starting from FSPDFDocSaveFlagNormal and this can be one or combination of these values. |
[in] | pause | Pause callback object which decides if the parsing process needs to be paused. This can be nil which means not to pause during the parsing process. If this is not nil, it should be a valid pause object implemented by user. |
- (FSProgressive *) startSaveAsWithWriterCallback: | (id<FSFileWriterCallback>) | file | |
save_flags: | (unsigned int) | save_flags | |
pause: | (id<FSPauseCallback>) | pause | |
Start to save current PDF document as another PDF file.
It may take a long time to saving PDF document, so this function uses a progressive process to do this.
If current document is loaded from an existing PDF file and a different file version has been set by FSPDFDoc::fileVersion before saving, Foxit PDF SDK will ignore FSPDFDocSaveFlagIncremental in parameter save_flags and use the file version in saved PDF file.
[in] | file | A FSFileWriterCallback object which is implemented by user to save a PDF document. |
[in] | save_flags | Document saving flags. Please refer to values starting from FSPDFDocSaveFlagNormal and this can be one or combination of these values. |
[in] | pause | Pause callback object which decides if the parsing process needs to be paused. This can be nil which means not to pause during the parsing process. If this is not nil, it should be a valid pause object implemented by user. |
|
readwritenonatomicassign |
Get or Set the display mode.
Display mode specifies how the document should be displayed when opened.