MFDocumentManager Class Reference
| Inherits from | NSObject |
| Conforms to | UIAlertViewDelegate |
| Declared in | MFDocumentManager.h |
Tasks
-
– getCropbox:andRotation:forPageNumber:withBuffer:Use this method to get the cropbox and the rotation of a certain pdf page.
-
– createImageForThumbnailOfPageNumber:ofSize:andScale:Create a thumbnail for a specific page. It will look far better than the thumbnail integrated inside the pdf, but it is also slower.
-
+ documentManagerWithFilePath:Factory method to create an MFDocumentManager instance from a know file path.
-
– outlineReturn an array of MFOutlineEntry as the outline/TOC of the pdf document.
-
– initWithFileUrl:Initializer. You can also use the factory method above.
-
– initWithDataProvider:Initializer with data provider.
-
– isLockedCheck if a document is encrypted and blocked by a password or not.
-
– tryUnlockWithPassword:Try to unlock the document with a password and return if the unlock has been successful or not.
-
– numberOfPagesReturn the number of pages that make up the document.
-
– pageNumberForDestinationNamed:This method will return the page number of the destination with the name passed as argument.
-
– emptyCacheClear the page cache. It is important to call this method on memory warning as in the sample code to prevent the application being killed right for excessive memory usage.
-
– searchResultOnPage:forSearchTerms:mode:ignoreCase:Return an array of MFTextItem representing the matches of teh search term on the page passed as arguments. It is a good choice running this method in a secondary thread. FPKSearchMode has the following values: FPKSearchModeHard – if you search for ‘bèzier’ it will match ‘bèzier’ only but not ‘bezier’. If you search for ‘bezier’ it will match ‘bezier’ only. FPKSearchModeSoft – if you search for term ‘bèzier’ it will match both ‘bezier’ and ‘bèzier’. Same if you search for ‘bezier’. FPKSearchModeSmart – if you search for term ‘bezier’, it will also match ‘bèzier’, but if you search for ‘bèzier’ it will match ‘bèzier’ only. Ignore case is self explanatory. Default parameters are FPKSearchModeSmart and ignoreCase to YES.
-
– searchResultOnPage:forSearchTerms:Compatibility methods for older version. It will call the above method with default values.
-
– searchResultOnPage:forSearchTerms:ignoreCase:Compatibility methods for older version. It will call the above method with default values.
-
– wholeTextForPage:Return a string representation of the text contained in a pdf page.
-
+ versionBuild version of this library. Useful for debugging purposes.
-
– uriAnnotationsForPageNumber:Array of every uri annotation for a selected page.
-
+ paramsFromURI:Get the parameters for a generic uri, useful to parse options passed with the annotations to customize the behaviour.
-
resourceFolderResouce folder for the document. Video, audio and other files referenced in the pdf are contained here.
property -
fontCacheEnabledEnable/disable the font cache. Tipically, you want the cache turned on. If you get a lot of [] (notdef) characters in the text extracted or the search turn up nothing, try to disabled set this to NO. Default value is YES.
property -
– glyphBoxesForPage:Return an array of FPKGlyphBox, that is, the bounding box of each glyph on the page and its unicode representation. Check FPKGlyphBox interface for details.
Properties
fontCacheEnabled
Enable/disable the font cache. Tipically, you want the cache turned on. If you get a lot of [] (notdef) characters in the text extracted or the search turn up nothing, try to disabled set this to NO. Default value is YES.
@property (nonatomic, assign) BOOL fontCacheEnabledDiscussion
Enable/disable the font cache. Tipically, you want the cache turned on. If you get a lot of [] (notdef) characters in the text extracted or the search turn up nothing, try to disabled set this to NO. Default value is YES.
Declared In
MFDocumentManager.hresourceFolder
Resouce folder for the document. Video, audio and other files referenced in the pdf are contained here.
@property (nonatomic, retain) NSString *resourceFolderDiscussion
Resouce folder for the document. Video, audio and other files referenced in the pdf are contained here.
Declared In
MFDocumentManager.hClass Methods
documentManagerWithFilePath:
Factory method to create an MFDocumentManager instance from a know file path.
+ (MFDocumentManager *)documentManagerWithFilePath:(NSString *)filePathDiscussion
Factory method to create an MFDocumentManager instance from a know file path.
Declared In
MFDocumentManager.hparamsFromURI:
Get the parameters for a generic uri, useful to parse options passed with the annotations to customize the behaviour.
+ (NSDictionary *)paramsFromURI:(NSString *)uriDiscussion
Get the parameters for a generic uri, useful to parse options passed with the annotations to customize the behaviour.
Declared In
MFDocumentManager.hInstance Methods
createImageForThumbnailOfPageNumber:ofSize:andScale:
Create a thumbnail for a specific page. It will look far better than the thumbnail integrated inside the pdf, but it is also slower.
- (CGImageRef)createImageForThumbnailOfPageNumber:(NSUInteger)pageNr ofSize:(CGSize)size andScale:(CGFloat)scaleDiscussion
Create a thumbnail for a specific page. It will look far better than the thumbnail integrated inside the pdf, but it is also slower.
Declared In
MFDocumentManager.hemptyCache
Clear the page cache. It is important to call this method on memory warning as in the sample code to prevent the application being killed right for excessive memory usage.
- (void)emptyCacheDiscussion
Clear the page cache. It is important to call this method on memory warning as in the sample code to prevent the application being killed right for excessive memory usage.
Declared In
MFDocumentManager.hgetCropbox:andRotation:forPageNumber:withBuffer:
Use this method to get the cropbox and the rotation of a certain pdf page.
- (void)getCropbox:(CGRect *)cropbox andRotation:(int *)rotation forPageNumber:(NSInteger)pageNumber withBuffer:(BOOL)withOrWithoutDiscussion
Use this method to get the cropbox and the rotation of a certain pdf page.
Declared In
MFDocumentManager.hglyphBoxesForPage:
Return an array of FPKGlyphBox, that is, the bounding box of each glyph on the page and its unicode representation. Check FPKGlyphBox interface for details.
- (NSArray *)glyphBoxesForPage:(NSUInteger)pageNrDiscussion
Return an array of FPKGlyphBox, that is, the bounding box of each glyph on the page and its unicode representation. Check FPKGlyphBox interface for details.
Declared In
MFDocumentManager.hinitWithDataProvider:
Initializer with data provider.
- (id)initWithDataProvider:(CGDataProviderRef)dataProviderDiscussion
Initializer with data provider.
Declared In
MFDocumentManager.hinitWithFileUrl:
Initializer. You can also use the factory method above.
- (id)initWithFileUrl:(NSURL *)anUrlDiscussion
Initializer. You can also use the factory method above.
Declared In
MFDocumentManager.hisLocked
Check if a document is encrypted and blocked by a password or not.
- (BOOL)isLockedDiscussion
Check if a document is encrypted and blocked by a password or not.
Declared In
MFDocumentManager.hnumberOfPages
Return the number of pages that make up the document.
- (NSUInteger)numberOfPagesDiscussion
Return the number of pages that make up the document.
Declared In
MFDocumentManager.houtline
Return an array of MFOutlineEntry as the outline/TOC of the pdf document.
- (NSMutableArray *)outlineDiscussion
Return an array of MFOutlineEntry as the outline/TOC of the pdf document.
Declared In
MFDocumentManager.hpageNumberForDestinationNamed:
This method will return the page number of the destination with the name passed as argument.
- (NSUInteger)pageNumberForDestinationNamed:(NSString *)nameDiscussion
This method will return the page number of the destination with the name passed as argument.
Declared In
MFDocumentManager.hsearchResultOnPage:forSearchTerms:
Compatibility methods for older version. It will call the above method with default values.
- (NSArray *)searchResultOnPage:(NSUInteger)pageNr forSearchTerms:(NSString *)searchTermDiscussion
Compatibility methods for older version. It will call the above method with default values.
Declared In
MFDocumentManager.hsearchResultOnPage:forSearchTerms:ignoreCase:
Compatibility methods for older version. It will call the above method with default values.
- (NSArray *)searchResultOnPage:(NSUInteger)pageNr forSearchTerms:(NSString *)searchTerm ignoreCase:(BOOL)ignoreOrNotDiscussion
Compatibility methods for older version. It will call the above method with default values.
Declared In
MFDocumentManager.hsearchResultOnPage:forSearchTerms:mode:ignoreCase:
Return an array of MFTextItem representing the matches of teh search term on the page passed as arguments. It is a good choice running this method in a secondary thread. FPKSearchMode has the following values: FPKSearchModeHard – if you search for ‘bèzier’ it will match ‘bèzier’ only but not ‘bezier’. If you search for ‘bezier’ it will match ‘bezier’ only. FPKSearchModeSoft – if you search for term ‘bèzier’ it will match both ‘bezier’ and ‘bèzier’. Same if you search for ‘bezier’. FPKSearchModeSmart – if you search for term ‘bezier’, it will also match ‘bèzier’, but if you search for ‘bèzier’ it will match ‘bèzier’ only. Ignore case is self explanatory. Default parameters are FPKSearchModeSmart and ignoreCase to YES.
- (NSArray *)searchResultOnPage:(NSUInteger)pageNr forSearchTerms:(NSString *)searchTerm mode:(FPKSearchMode)mode ignoreCase:(BOOL)ignoreOrNotDiscussion
Return an array of MFTextItem representing the matches of teh search term on the page passed as arguments. It is a good choice running this method in a secondary thread. FPKSearchMode has the following values: FPKSearchModeHard – if you search for ‘bèzier’ it will match ‘bèzier’ only but not ‘bezier’. If you search for ‘bezier’ it will match ‘bezier’ only. FPKSearchModeSoft – if you search for term ‘bèzier’ it will match both ‘bezier’ and ‘bèzier’. Same if you search for ‘bezier’. FPKSearchModeSmart – if you search for term ‘bezier’, it will also match ‘bèzier’, but if you search for ‘bèzier’ it will match ‘bèzier’ only. Ignore case is self explanatory. Default parameters are FPKSearchModeSmart and ignoreCase to YES.
Declared In
MFDocumentManager.htryUnlockWithPassword:
Try to unlock the document with a password and return if the unlock has been successful or not.
- (BOOL)tryUnlockWithPassword:(NSString *)aPasswordDiscussion
Try to unlock the document with a password and return if the unlock has been successful or not.
Declared In
MFDocumentManager.h