Permalink
Browse files

Merge branch 'devel'

  • Loading branch information...
2 parents eba326f + aacafdb commit b50d4baff0d48a0fa2fa77e55210743edee470f3 @s1g53gv s1g53gv committed Dec 30, 2011
Showing with 174 additions and 22 deletions.
  1. BIN Bundle/FPKKioskBundle.bundle/Info.plist
  2. BIN Bundle/FPKKioskBundle.bundle/Kiosk_ipad.nib
  3. BIN Bundle/FPKKioskBundle.bundle/Kiosk_phone.nib
  4. BIN Bundle/FPKKioskBundle.bundle/backThumb.png
  5. BIN Bundle/FPKKioskBundle.bundle/backThumb_iphone.png
  6. BIN Bundle/FPKKioskBundle.bundle/backThumb_iphone@2x.png
  7. BIN Bundle/FPKKioskBundle.bundle/border.png
  8. BIN Bundle/FPKKioskBundle.bundle/download.png
  9. BIN Bundle/FPKKioskBundle.bundle/header.png
  10. BIN Bundle/FPKKioskBundle.bundle/header_iphone.png
  11. BIN Bundle/FPKKioskBundle.bundle/header_iphone@2x.png
  12. BIN Bundle/FPKKioskBundle.bundle/pause.png
  13. BIN Bundle/FPKKioskBundle.bundle/remove.png
  14. BIN Bundle/FPKKioskBundle.bundle/resume.png
  15. BIN Bundle/FPKKioskBundle.bundle/view.png
  16. BIN Bundle/FPKReaderBundle.bundle/AudioViewController.nib
  17. BIN Bundle/FPKReaderBundle.bundle/BookmarkView.nib
  18. BIN Bundle/FPKReaderBundle.bundle/OutlineView.nib
  19. BIN Bundle/FPKReaderBundle.bundle/SearchView2_pad.nib
  20. BIN Bundle/FPKReaderBundle.bundle/SearchView2_phone.nib
  21. BIN Bundle/FPKReaderBundle.bundle/TextDisplayView.nib
  22. BIN Bundle/FPKReaderBundle.bundle/WebBrowser.nib
  23. +20 −1 Classes/Reader/ReaderViewController.m
  24. +3 −0 FPKCore/FPKAnnotation.h
  25. +42 −0 FPKCore/FPKGlyphBox.h
  26. +4 −0 FPKCore/FPKURIAnnotation.h
  27. +6 −0 FPKCore/MFDocumentManager.h
  28. +18 −0 FPKCore/MFDocumentViewController.h
  29. BIN FPKCore/libFastPdfKit.a
  30. +0 −1 FastPdfKit.embeddedframework/FastPdfKit.framework/Versions/A/A
  31. BIN FastPdfKit.embeddedframework/FastPdfKit.framework/Versions/A/FastPdfKit
  32. +42 −0 FastPdfKit.embeddedframework/FastPdfKit.framework/Versions/A/Headers/FPKGlyphBox.h
  33. +0 −1 FastPdfKit.embeddedframework/FastPdfKit.framework/Versions/A/Headers/Headers
  34. +6 −0 FastPdfKit.embeddedframework/FastPdfKit.framework/Versions/A/Headers/MFDocumentManager.h
  35. BIN ...ramework/FastPdfKit.framework/Versions/A/Resources/FPKReaderBundle.bundle/AudioViewController.nib
  36. BIN ...beddedframework/FastPdfKit.framework/Versions/A/Resources/FPKReaderBundle.bundle/BookmarkView.nib
  37. BIN ...mbeddedframework/FastPdfKit.framework/Versions/A/Resources/FPKReaderBundle.bundle/OutlineView.nib
  38. BIN ...dedframework/FastPdfKit.framework/Versions/A/Resources/FPKReaderBundle.bundle/SearchView2_pad.nib
  39. BIN ...dframework/FastPdfKit.framework/Versions/A/Resources/FPKReaderBundle.bundle/SearchView2_phone.nib
  40. BIN ...dedframework/FastPdfKit.framework/Versions/A/Resources/FPKReaderBundle.bundle/TextDisplayView.nib
  41. BIN ...embeddedframework/FastPdfKit.framework/Versions/A/Resources/FPKReaderBundle.bundle/WebBrowser.nib
  42. +0 −1 FastPdfKit.embeddedframework/FastPdfKit.framework/Versions/A/Resources/Resources
  43. +0 −1 FastPdfKit.embeddedframework/Resources/Resources
  44. +22 −16 FastPdfKit.xcodeproj/project.pbxproj
  45. +10 −0 README.md
  46. +1 −1 Resources/FastPdfKit_Kiosk-Info.plist
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.
View
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.
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.
@@ -1065,6 +1065,8 @@ -(void) documentViewController:(MFDocumentViewController *)dvc didReceiveTapAtPo
if(!multimediaVisible){
if(hudHidden) {
+
+ [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide];
[self showToolbar];
[self showHorizontalThumbnails];
@@ -1076,6 +1078,8 @@ -(void) documentViewController:(MFDocumentViewController *)dvc didReceiveTapAtPo
} else {
// Hide
+
+ [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
[self hideToolbar];
[self hideHorizontalThumbnails];
@@ -1106,6 +1110,9 @@ - (void)loadView {
// Create the view of the right size. Keep into consideration height of the status bar and the navigation bar. If
// you want to add a toolbar, use the navigation controller's one like you would with an UIImageView to not cover
// the document.
+
+ [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
+ [self setWantsFullScreenLayout:YES];
UIView * aView = nil;
BOOL isPad = NO;
@@ -1832,7 +1839,7 @@ -(void)showToolbar {
[UIView beginAnimations:@"show" context:NULL];
[UIView setAnimationDuration:0.35];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
- [rollawayToolbar setFrame:CGRectMake(0, 0, rollawayToolbar.frame.size.width, toolbarHeight)];
+ [rollawayToolbar setFrame:CGRectMake(0, 20, rollawayToolbar.frame.size.width, toolbarHeight)];
[UIView commitAnimations];
}
@@ -2124,6 +2131,11 @@ - (void)viewDidUnload {
self.changeDirectionBarButtonItem = nil;
self.changeLeadBarButtonItem = nil;
self.searchBarButtonItem = nil;
+ self.textBarButtonItem = nil;
+ self.numberOfPageTitleBarButtonItem = nil;
+ self.outlineBarButtonItem = nil;
+ self.bookmarkBarButtonItem = nil;
+ self.dismissBarButtonItem = nil;
self.changeModeButton = nil;
self.zoomLockButton = nil;
@@ -2150,11 +2162,18 @@ - (void)dealloc {
[rollawayToolbar release];
+ // Bar button item.
+
[searchBarButtonItem release], searchBarButtonItem = nil;
[zoomLockBarButtonItem release], zoomLockBarButtonItem = nil;
[changeModeBarButtonItem release], changeModeBarButtonItem = nil;
[changeDirectionBarButtonItem release], changeDirectionBarButtonItem = nil;
[changeLeadBarButtonItem release], changeLeadBarButtonItem = nil;
+ [textBarButtonItem release], textBarButtonItem = nil;
+ [numberOfPageTitleBarButtonItem release], numberOfPageTitleBarButtonItem = nil;
+ [outlineBarButtonItem release], outlineBarButtonItem = nil;
+ [bookmarkBarButtonItem release], bookmarkBarButtonItem = nil;
+ [dismissBarButtonItem release], dismissBarButtonItem = nil;
[zoomLockButton release],zoomLockButton = nil;
[changeModeButton release],changeModeButton = nil;
View
@@ -15,6 +15,9 @@
}
+/**
+ Rect of the annotation in page coordinates (origin at the bottom left).
+ */
@property (nonatomic,readwrite) CGRect rect;
@end
View
@@ -0,0 +1,42 @@
+//
+// MFGlyphBox.h
+// FastPdfKitLibrary
+//
+// Created by Nicolò Tosi on 11/29/11.
+// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <QuartzCore/QuartzCore.h>
+
+@interface FPKGlyphBox : NSObject {
+
+ CGRect box;
+
+ BOOL synthesized;
+ unsigned int * unicodes;
+ int unicodes_len;
+}
+
+-(id)initWithBox:(CGRect)box unicodes:(unsigned int *)unicodes length:(int)len;
+
+@property (nonatomic,readwrite) BOOL synthesized;
+
+/**
+ Bounding box of the glyph in page space.
+ */
+@property (nonatomic,readwrite) CGRect box;
+
+/**
+ UTF-8 string representation of the text of this glyph box, usually is just a
+ single unicode codepoint. It is synthesized from an opaque representation.
+ */
+-(NSString *)text;
+
+/**
+ Class method to convert an array of MFGlyphBox into an human-readable string. It
+ does not call a concatenation of -text message, so it is faster.
+ */
++(NSString *)textFromBoxArray:(NSArray *)array;
+
+@end
@@ -12,5 +12,9 @@
@interface FPKURIAnnotation : FPKAnnotation {
NSString * uri;
}
+
+/**
+ URI associated to the annotation.
+ */
@property (nonatomic,copy) NSString * uri;
@end
@@ -165,4 +165,10 @@
*/
@property (nonatomic,assign) BOOL fontCacheEnabled;
+/**
+ 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;
+
@end
@@ -80,6 +80,7 @@
CGFloat padding;
BOOL useTiledOverlayView;
+
}
@property (assign) NSObject<MFDocumentViewControllerDelegate> *documentDelegate;
@@ -311,6 +312,15 @@
*/
-(void)moveToPreviousPage;
+/**
+ Call this method rightly after dismissing this MFDocumentViewController
+ instance. It will release all the resources and stop the background threads.
+ Once this method has been called, the MFDocumentViewController instance cannot
+ be considered valid anymore and should be released.
+ */
+-(void)cleanUp;
+
+
/**
Convert a point from MFDocumentViewController's view space to page space.
*/
@@ -370,4 +380,12 @@
*/
-(void)setMaximumZoomScale:(NSNumber *)scale;
+/**
+ Set the max number of preview images to use at any time. Call this before
+ presenting the MFDocumentViewController subclass. Default is 4, sweet spot is
+ 3-4 and you should not exceed this number unless your target device are iPhone4
+ iPad2 or newer devices and/or your PDF are scarce of images.
+ */
+@property (nonatomic,readwrite) NSUInteger previewsCount;
+
@end
View
Binary file not shown.
@@ -0,0 +1,42 @@
+//
+// MFGlyphBox.h
+// FastPdfKitLibrary
+//
+// Created by Nicolò Tosi on 11/29/11.
+// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <QuartzCore/QuartzCore.h>
+
+@interface FPKGlyphBox : NSObject {
+
+ CGRect box;
+
+ BOOL synthesized;
+ unsigned int * unicodes;
+ int unicodes_len;
+}
+
+-(id)initWithBox:(CGRect)box unicodes:(unsigned int *)unicodes length:(int)len;
+
+@property (nonatomic,readwrite) BOOL synthesized;
+
+/**
+ Bounding box of the glyph in page space.
+ */
+@property (nonatomic,readwrite) CGRect box;
+
+/**
+ UTF-8 string representation of the text of this glyph box, usually is just a
+ single unicode codepoint. It is synthesized from an opaque representation.
+ */
+-(NSString *)text;
+
+/**
+ Class method to convert an array of MFGlyphBox into an human-readable string. It
+ does not call a concatenation of -text message, so it is faster.
+ */
++(NSString *)textFromBoxArray:(NSArray *)array;
+
+@end
@@ -165,4 +165,10 @@
*/
@property (nonatomic,assign) BOOL fontCacheEnabled;
+/**
+ 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;
+
@end
Oops, something went wrong.

0 comments on commit b50d4ba

Please sign in to comment.