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.
-
– outline
Return 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.
-
– isLocked
Check 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.
-
– numberOfPages
Return 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.
-
– emptyCache
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.
-
– 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.
-
+ version
Build 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.
-
resourceFolder
Resouce folder for the document. Video, audio and other files referenced in the pdf are contained here.
property -
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 -
– 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 fontCacheEnabled
Discussion
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.h
resourceFolder
Resouce folder for the document. Video, audio and other files referenced in the pdf are contained here.
@property (nonatomic, retain) NSString *resourceFolder
Discussion
Resouce folder for the document. Video, audio and other files referenced in the pdf are contained here.
Declared In
MFDocumentManager.h
Class Methods
documentManagerWithFilePath:
Factory method to create an MFDocumentManager instance from a know file path.
+ (MFDocumentManager *)documentManagerWithFilePath:(NSString *)filePath
Discussion
Factory method to create an MFDocumentManager instance from a know file path.
Declared In
MFDocumentManager.h
paramsFromURI:
Get the parameters for a generic uri, useful to parse options passed with the annotations to customize the behaviour.
+ (NSDictionary *)paramsFromURI:(NSString *)uri
Discussion
Get the parameters for a generic uri, useful to parse options passed with the annotations to customize the behaviour.
Declared In
MFDocumentManager.h
Instance 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)scale
Discussion
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.h
emptyCache
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)emptyCache
Discussion
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.h
getCropbox: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)withOrWithout
Discussion
Use this method to get the cropbox and the rotation of a certain pdf page.
Declared In
MFDocumentManager.h
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.
- (NSArray *)glyphBoxesForPage:(NSUInteger)pageNr
Discussion
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.h
initWithDataProvider:
Initializer with data provider.
- (id)initWithDataProvider:(CGDataProviderRef)dataProvider
Discussion
Initializer with data provider.
Declared In
MFDocumentManager.h
initWithFileUrl:
Initializer. You can also use the factory method above.
- (id)initWithFileUrl:(NSURL *)anUrl
Discussion
Initializer. You can also use the factory method above.
Declared In
MFDocumentManager.h
isLocked
Check if a document is encrypted and blocked by a password or not.
- (BOOL)isLocked
Discussion
Check if a document is encrypted and blocked by a password or not.
Declared In
MFDocumentManager.h
numberOfPages
Return the number of pages that make up the document.
- (NSUInteger)numberOfPages
Discussion
Return the number of pages that make up the document.
Declared In
MFDocumentManager.h
outline
Return an array of MFOutlineEntry as the outline/TOC of the pdf document.
- (NSMutableArray *)outline
Discussion
Return an array of MFOutlineEntry as the outline/TOC of the pdf document.
Declared In
MFDocumentManager.h
pageNumberForDestinationNamed:
This method will return the page number of the destination with the name passed as argument.
- (NSUInteger)pageNumberForDestinationNamed:(NSString *)name
Discussion
This method will return the page number of the destination with the name passed as argument.
Declared In
MFDocumentManager.h
searchResultOnPage:forSearchTerms:
Compatibility methods for older version. It will call the above method with default values.
- (NSArray *)searchResultOnPage:(NSUInteger)pageNr forSearchTerms:(NSString *)searchTerm
Discussion
Compatibility methods for older version. It will call the above method with default values.
Declared In
MFDocumentManager.h
searchResultOnPage: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)ignoreOrNot
Discussion
Compatibility methods for older version. It will call the above method with default values.
Declared In
MFDocumentManager.h
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.
- (NSArray *)searchResultOnPage:(NSUInteger)pageNr forSearchTerms:(NSString *)searchTerm mode:(FPKSearchMode)mode ignoreCase:(BOOL)ignoreOrNot
Discussion
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.h
tryUnlockWithPassword:
Try to unlock the document with a password and return if the unlock has been successful or not.
- (BOOL)tryUnlockWithPassword:(NSString *)aPassword
Discussion
Try to unlock the document with a password and return if the unlock has been successful or not.
Declared In
MFDocumentManager.h