Permalink
Browse files

11112011

- Enhanced search and extraction with Unicode composition and decomposition. Please look at MFDocumentManager's -searchResult... methods for details.
  • Loading branch information...
1 parent 404c2c3 commit 46167e92ea964c5f6cba01f6df92ce132a0044a1 @s1g53gv s1g53gv committed Nov 11, 2011
Showing with 125 additions and 57 deletions.
  1. +30 −0 Bundle/FPKKioskBundle.bundle/kiosk_list.xml
  2. BIN Bundle/FPKReaderBundle.bundle/AudioViewController.nib
  3. BIN Bundle/FPKReaderBundle.bundle/BookmarkView.nib
  4. BIN Bundle/FPKReaderBundle.bundle/Info.plist
  5. BIN Bundle/FPKReaderBundle.bundle/OutlineView.nib
  6. BIN Bundle/FPKReaderBundle.bundle/SearchView2_pad.nib
  7. BIN Bundle/FPKReaderBundle.bundle/SearchView2_phone.nib
  8. BIN Bundle/FPKReaderBundle.bundle/TextDisplayView.nib
  9. BIN Bundle/FPKReaderBundle.bundle/WebBrowser.nib
  10. BIN Bundle/FPKReaderBundle.bundle/X.png
  11. BIN Bundle/FPKReaderBundle.bundle/X_phone.png
  12. BIN Bundle/FPKReaderBundle.bundle/X_phone@2x.png
  13. BIN Bundle/FPKReaderBundle.bundle/blackslider.png
  14. BIN Bundle/FPKReaderBundle.bundle/bookmark_add.png
  15. BIN Bundle/FPKReaderBundle.bundle/bookmark_add_phone.png
  16. BIN Bundle/FPKReaderBundle.bundle/bookmark_add_phone@2x.png
  17. BIN Bundle/FPKReaderBundle.bundle/changeModeDouble.png
  18. BIN Bundle/FPKReaderBundle.bundle/changeModeDouble_phone.png
  19. BIN Bundle/FPKReaderBundle.bundle/changeModeDouble_phone@2x.png
  20. BIN Bundle/FPKReaderBundle.bundle/changeModeSingle.png
  21. BIN Bundle/FPKReaderBundle.bundle/changeModeSingle_phone.png
  22. BIN Bundle/FPKReaderBundle.bundle/changeModeSingle_phone@2x.png
  23. BIN Bundle/FPKReaderBundle.bundle/close.png
  24. BIN Bundle/FPKReaderBundle.bundle/close_player.png
  25. BIN Bundle/FPKReaderBundle.bundle/direction_l2r.png
  26. BIN Bundle/FPKReaderBundle.bundle/direction_l2r_phone.png
  27. BIN Bundle/FPKReaderBundle.bundle/direction_l2r_phone@2x.png
  28. BIN Bundle/FPKReaderBundle.bundle/direction_r2l.png
  29. BIN Bundle/FPKReaderBundle.bundle/direction_r2l_phone.png
  30. BIN Bundle/FPKReaderBundle.bundle/direction_r2l_phone@2x.png
  31. BIN Bundle/FPKReaderBundle.bundle/hud_player.png
  32. BIN Bundle/FPKReaderBundle.bundle/img_outline_triangledown.png
  33. BIN Bundle/FPKReaderBundle.bundle/img_outline_triangleright.png
  34. BIN Bundle/FPKReaderBundle.bundle/img_overflow_pad.png
  35. BIN Bundle/FPKReaderBundle.bundle/img_overflow_phone.png
  36. BIN Bundle/FPKReaderBundle.bundle/img_overflow_phone@2x.png
  37. BIN Bundle/FPKReaderBundle.bundle/indice.png
  38. BIN Bundle/FPKReaderBundle.bundle/indice_phone.png
  39. BIN Bundle/FPKReaderBundle.bundle/minisearch_back.png
  40. BIN Bundle/FPKReaderBundle.bundle/minisearch_cancel.png
  41. BIN Bundle/FPKReaderBundle.bundle/minisearch_cancel@2x.png
  42. BIN Bundle/FPKReaderBundle.bundle/minisearch_full.png
  43. BIN Bundle/FPKReaderBundle.bundle/minisearch_full@2x.png
  44. BIN Bundle/FPKReaderBundle.bundle/minisearch_next.png
  45. BIN Bundle/FPKReaderBundle.bundle/minisearch_next@2x.png
  46. BIN Bundle/FPKReaderBundle.bundle/minisearch_prev.png
  47. BIN Bundle/FPKReaderBundle.bundle/minisearch_prev@2x.png
  48. BIN Bundle/FPKReaderBundle.bundle/next.png
  49. BIN Bundle/FPKReaderBundle.bundle/pagelead.png
  50. BIN Bundle/FPKReaderBundle.bundle/pagelead_click.png
  51. BIN Bundle/FPKReaderBundle.bundle/pagelead_click_phone.png
  52. BIN Bundle/FPKReaderBundle.bundle/pagelead_phone.png
  53. BIN Bundle/FPKReaderBundle.bundle/pagelead_phone@2x.png
  54. BIN Bundle/FPKReaderBundle.bundle/pause_player.png
  55. BIN Bundle/FPKReaderBundle.bundle/play_player.png
  56. BIN Bundle/FPKReaderBundle.bundle/prew.png
  57. BIN Bundle/FPKReaderBundle.bundle/reload.png
  58. BIN Bundle/FPKReaderBundle.bundle/search.png
  59. BIN Bundle/FPKReaderBundle.bundle/search_phone.png
  60. BIN Bundle/FPKReaderBundle.bundle/search_phone@2x.png
  61. BIN Bundle/FPKReaderBundle.bundle/stop.png
  62. BIN Bundle/FPKReaderBundle.bundle/text.png
  63. BIN Bundle/FPKReaderBundle.bundle/text_phone.png
  64. BIN Bundle/FPKReaderBundle.bundle/text_phone@2x.png
  65. BIN Bundle/FPKReaderBundle.bundle/zoomLock.png
  66. BIN Bundle/FPKReaderBundle.bundle/zoomLock_phone.png
  67. BIN Bundle/FPKReaderBundle.bundle/zoomLock_phone@2x.png
  68. BIN Bundle/FPKReaderBundle.bundle/zoomUnlock.png
  69. BIN Bundle/FPKReaderBundle.bundle/zoomUnlock_phone.png
  70. BIN Bundle/FPKReaderBundle.bundle/zoomUnlock_phone@2x.png
  71. +3 −1 Classes/KioskApp/FastPDFKit_KioskAppDelegate.m
  72. +2 −2 Classes/Reader/ThumbnailSlider/TVThumbnailScrollView.h
  73. +3 −3 Classes/Reader/ThumbnailSlider/TVThumbnailScrollView.m
  74. +8 −2 Classes/Reader/ThumbnailSlider/TVThumbnailView.h
  75. +32 −11 FPKCore/MFDocumentManager.h
  76. +13 −0 FPKCore/Stuff.h
  77. BIN FPKCore/libFastPdfKit.a
  78. +34 −38 FastPdfKit.xcodeproj/project.pbxproj
@@ -1,6 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<response>
<list>
+ <pdf>
+ <title>Multimedia</title>
+ <link>http://reader.fastpdfkit.com/Multimedia.pdf</link>
+ <cover>http://reader.fastpdfkit.com/Multimedia.jpg</cover>
+ </pdf>
+ <pdf>
+ <title>Readme</title>
+ <link>http://reader.fastpdfkit.com/readme.pdf</link>
+ <cover>http://reader.fastpdfkit.com/readme.jpg</cover>
+ </pdf>
+ <pdf>
+ <title>Sources</title>
+ <link>http://reader.fastpdfkit.com/sources.pdf</link>
+ <cover>http://reader.fastpdfkit.com/sources.jpg</cover>
+ </pdf>
+ <pdf>
+ <title>License</title>
+ <link>http://fastpdfkit.com/license.pdf</link>
+ <cover>http://reader.fastpdfkit.com/license.jpg</cover>
+ </pdf>
+ <pdf>
+ <title>Documentation</title>
+ <link>http://doc.fastpdfkit.com/manual.pdf</link>
+ <cover>http://reader.fastpdfkit.com/doc.jpg</cover>
+ </pdf>
+ <pdf>
+ <title>Documentation</title>
+ <link>http://reader.fastpdfkit.com/kb.pdf</link>
+ <cover>http://reader.fastpdfkit.com/kb.jpg</cover>
+ </pdf>
<pdf>
<title>Aperture</title>
<link>http://go.mobfarm.eu/pdf/Aperture.pdf</link>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
@@ -39,7 +39,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[self application:application didReceiveRemoteNotification:[launchOptions objectForKey:@"UIApplicationLaunchOptionsRemoteNotificationKey"]];
}
- NSLog(@"FastPdfKit Version: %@",[MFDocumentManager version]);
+ // Uncomment to print the library version.
+ // NSLog(@"FastPdfKit Version: %@",[MFDocumentManager version]);
MenuViewController_Kiosk *aMenuViewController = nil;
@@ -68,6 +69,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[aNavController release];
[aMenuViewController release];
+ [plistDict release];
return YES;
}
@@ -8,8 +8,8 @@
#import <UIKit/UIKit.h>
#import "MFDocumentManager.h"
+#import "TVThumbnailView.h"
-@class TVThumbnailView;
@class TVThumbnailScrollView;
@protocol TVThumbnailScrollViewDelegate
@@ -18,7 +18,7 @@
@end
-@interface TVThumbnailScrollView : UIView <UIScrollViewDelegate> {
+@interface TVThumbnailScrollView : UIView <UIScrollViewDelegate, TVThumbnailViewDelegate> {
NSUInteger thumbnailCount;
@@ -7,7 +7,6 @@
//
#import "TVThumbnailScrollView.h"
-#import "TVThumbnailView.h"
@interface TVThumbnailScrollView()
@@ -107,14 +106,15 @@ -(void)generateThumbnailOrSkip:(id)something {
// Thumbnail rendering here.
+
CGImageRef image = [document createImageForThumbnailOfPageNumber:pageNr ofSize:thumbnailSize andScale:1.0];
UIImage * img = [[UIImage alloc]initWithCGImage:image];
NSData * data = UIImagePNGRepresentation(img);
[fileManager createFileAtPath:path contents:data attributes:nil];
- CGImageRelease(image);
+ CGImageRelease(image); // You are responsible for release the CGImageRef.
[self performSelectorOnMainThread:@selector(handleThumbDone:) withObject:img waitUntilDone:NO];
@@ -313,7 +313,7 @@ -(void)thumbTapped:(NSInteger)position withObject:(id)obj {
//[self setPage:[self pageForPosition:position] animated:YES];
}
--(void)scrollViewDidScroll:(UIScrollView *)scrollView {
+-(void)scrollViewDidScroll:(UIScrollView *)aScrollView {
// NSLog(@"didScroll");
@@ -10,6 +10,12 @@
@class TVThumbnailScrollView;
+@protocol TVThumbnailViewDelegate
+
+-(void)thumbTapped:(NSInteger)position withObject:(id)obj;
+
+@end
+
@interface TVThumbnailView : UIView {
UIActivityIndicatorView * activityIndicator;
@@ -24,7 +30,7 @@
UIImage * thumbnailImage;
- TVThumbnailScrollView * delegate;
+ id<TVThumbnailViewDelegate> delegate;
}
@property (nonatomic,retain) NSNumber * pageNumber;
@@ -35,7 +41,7 @@
@property (nonatomic,retain) UIActivityIndicatorView * activityIndicator;
-@property (nonatomic,assign) TVThumbnailScrollView * delegate;
+@property (nonatomic,assign) id<TVThumbnailViewDelegate> delegate;
@property (nonatomic,readwrite) NSInteger position;
@@ -9,7 +9,7 @@
#import <Foundation/Foundation.h>
#import <QuartzCore/QuartzCore.h>
#import <UIKit/UIKit.h>
-#import "mfprofile.h"
+#import "Stuff.h"
@class MFOffscreenRenderer;
@@ -51,8 +51,8 @@
-(void)getCropbox:(CGRect *)cropbox andRotation:(int *)rotation forPageNumber:(NSInteger)pageNumber withBuffer:(BOOL)withOrWithout;
/**
- Create a thumbnail for a specific page. It will look far better than the thumbnail integrated inside the pdf, but
- it is also slower.
+ 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;
@@ -82,7 +82,8 @@
-(BOOL)isLocked;
/**
- Try to unlock the document with a password and return if the unlock has been successful or not.
+ Try to unlock the document with a password and return if the unlock has been
+ successful or not.
*/
-(BOOL)tryUnlockWithPassword:(NSString *)aPassword;
@@ -92,21 +93,39 @@
-(NSUInteger)numberOfPages;
/**
- This method will return the page number of the destination with the name passed as argument.
+ This method will return the page number of the destination with the name passed
+ as argument.
*/
-(NSUInteger)pageNumberForDestinationNamed:(NSString *)name;
/**
- 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.
+ 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;
/**
- 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.
+ 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;
+
+/**
+ Compatibility methods for older version. It will call the above method with default values.
*/
-(NSArray *)searchResultOnPage:(NSUInteger)pageNr forSearchTerms:(NSString *)searchTerm;
+-(NSArray *)searchResultOnPage:(NSUInteger)pageNr forSearchTerms:(NSString *)searchTerm ignoreCase:(BOOL)ignoreOrNot;
/**
Return a string representation of the text contained in a pdf page.
@@ -124,12 +143,14 @@
-(NSArray *)uriAnnotationsForPageNumber:(NSUInteger)pageNr;
/**
- Get the parameters for a generic uri, useful to parse options passed with the annotations to customize the behaviour.
+ Get the parameters for a generic uri, useful to parse options passed with the
+ annotations to customize the behaviour.
*/
+(NSDictionary *)paramsFromURI:(NSString *)uri;
/**
- Resouce folder for the document. Video, audio and other files referenced in the pdf are contained here.
+ Resouce folder for the document. Video, audio and other files referenced in the
+ pdf are contained here.
*/
@property (nonatomic,retain) NSString * resourceFolder;
View
@@ -25,6 +25,19 @@ free((x)),(x)=NULL; \
#define PRINT_RECT(c,r) NSLog(@"%@ - (%.3f, %.3f)[%.3f x %.3f]",(c),(r).origin.x,(r).origin.y,(r).size.width,(r).size.height)
#define PRINT_SIZE(c,s) NSLog(@"%@ - (%.3f, %.3f)",(c),(s).width,(s).height)
+/**
+ Search mode for MFDocumentManager search methods.
+ FPKSearchModeHard - if you search for term 'à' it will only match 'à'.
+ FPKSearchModeSoft - if you search for term 'à' it will match 'a' and 'à'.
+ FPKSearchModeSmart - if you search for term 'a' it will match both 'a' and 'à', but if you search for 'à' it will only match 'à'.
+ */
+enum FPKSearchMode {
+ FPKSearchModeHard = 1,
+ FPKSearchModeSoft = 2,
+ FPKSearchModeSmart = 0
+};
+typedef unsigned int FPKSearchMode;
+
/**
When the lead property of the MFDocumentViewController is set to MFDocumentLeadLeft, the odd numbered page is shown
on the left side of the view. MFDocumentLeadRight move the odd page on the right, and this should be the default behaviour
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 46167e9

Please sign in to comment.