Skip to content

Commit

Permalink
0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vfr committed Jul 16, 2017
1 parent 1b67c9a commit a804e1d
Show file tree
Hide file tree
Showing 149 changed files with 21,540 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
project.xcworkspace
xcuserdata
Todo.txt
32 changes: 32 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
UXReader

Copyright © 2017 Julius Oklamcak. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to
do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-=-=-=-=-=-=-=-=-

PDFium

https://pdfium.googlesource.com/pdfium/+/master/LICENSE

-=-=-=-=-=-=-=-=-

iOS, iPad, iPhone, iPod touch are registered trademarks of Apple Inc.
All other trademarks and service marks are the properties of their
respective owners.
57 changes: 55 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,55 @@
# UXReader-iOS
UXReader PDF Framework for iOS

## UXReader PDF Framework for iOS

### Introduction

The UXReader PDF Framework for iOS is a fully open-source iOS PDF Framework based
on the open-source [PDFium](https://pdfium.googlesource.com/pdfium/) library.

### Features

* Document searching (with options).
* Single page horizontal and vertical scrolling.
* Double page horizontal and vertical scrolling.
* Right to Left and Left to Right UI and document presentation.
* Table of Contents (aka PDF outline) extraction.
* Page text extraction (by co-ordinates or character index).
* Page links (goto page and URL).
* Page labels ("Cover", "i", "ii", etc).
* Document metadata extraction (Creator, etc).
* Local NSURL, NSData and custom document data sources.
* Experimental remote NSURL document data source.
* Custom overlay rendering object support (watermarking).
* Opening password protected documents.
* Device rotation and all orientations.

### Notes

The code is universal, written in Objective-C++ (works with Swift or plain
Objective-C) and does not require storyboards or any NIBs (as all UI elements
are generated in code with graphics resources bundled in the framework It runs
on iPad, iPhone and iPod touch with iOS 9.0 and up and is ready to be fully
internationalized.

Please see the sample Reader project on how to use the UXReader framework
(class and method documentation is still on the todo list).

### Contact Info

Website: [http://www.vfr.org/](http://www.vfr.org/)

Email: joklamcak(at)gmail(dot)com

Twitter: [@joklamcak](https://twitter.com/joklamcak)

### License

This code has been made available under the MIT License.

### Screens

![iPad1](http://i.imgur.com/ucaBYZg.png?1)
![iPad2](http://i.imgur.com/xCdcvLR.png?1)
![iPad3](http://i.imgur.com/8FGW03U.png?1)
![iPad4](http://i.imgur.com/T2D3TlT.png?2)
![iPad5](http://i.imgur.com/yr6IJM0.png?1)
10 changes: 10 additions & 0 deletions Reader.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

504 changes: 504 additions & 0 deletions Reader/Reader.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file added Reader/Reader/Graphics/Reader-Icon-076.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Reader/Reader/Graphics/Reader-Icon-120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Reader/Reader/Graphics/Reader-Icon-152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Reader/Reader/Graphics/Reader-Icon-167.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Reader/Reader/Graphics/Reader-Icon-180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Reader/Reader/Graphics/Reader-Toolbar-Options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Reader/Reader/Graphics/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Reader/Reader/Graphics/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Reader/Reader/Graphics/Reader-Toolbar-Search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Reader/Reader/Graphics/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Reader/Reader/Graphics/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions Reader/Reader/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
<string>0.1.0</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>CFBundleIconFiles</key>
<array>
<string>Reader-Icon-180</string>
<string>Reader-Icon-167</string>
<string>Reader-Icon-152</string>
<string>Reader-Icon-120</string>
<string>Reader-Icon-076</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIStatusBarHidden</key>
<true/>
<key>UIRequiresFullScreen</key>
<false/>
<key>UIFileSharingEnabled</key>
<true/>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>PDF</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.adobe.pdf</string>
</array>
</dict>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleURLSchemes</key>
<array>
<string>uxreader</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>uxreader</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>
12 changes: 12 additions & 0 deletions Reader/Reader/ReaderAppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// ReaderAppDelegate.h
// Reader v0.1
//
// Copyright © 2017 Julius Oklamcak. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ReaderAppDelegate : UIResponder <UIApplicationDelegate>

@end
142 changes: 142 additions & 0 deletions Reader/Reader/ReaderAppDelegate.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
//
// ReaderAppDelegate.mm
// Reader v0.1
//
// Copyright © 2017 Julius Oklamcak. All rights reserved.
//

#import "ReaderAppDelegate.h"
#import "ReaderViewController.h"
#import "ReaderSplitController.h"

@implementation ReaderAppDelegate
{
UIWindow *mainWindow;
}

#pragma mark - ReaderAppDelegate methods

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//NSLog(@"%s %@", __FUNCTION__, launchOptions);

const CGRect bounds = [[UIScreen mainScreen] bounds];

mainWindow = [[UIWindow alloc] initWithFrame:bounds];

mainWindow.backgroundColor = [UIColor colorWithWhite:1.0 alpha:1.0];

mainWindow.rootViewController = [[ReaderViewController alloc] init];

[mainWindow makeKeyAndVisible];

return YES;
}

/*
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//NSLog(@"%s %@", __FUNCTION__, launchOptions);
const CGRect bounds = [[UIScreen mainScreen] bounds];
mainWindow = [[UIWindow alloc] initWithFrame:bounds];
mainWindow.backgroundColor = [UIColor colorWithWhite:1.0 alpha:1.0];
mainWindow.rootViewController = [[ReaderSplitController alloc] init];
[mainWindow makeKeyAndVisible];
return YES;
}
*/

/*
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//NSLog(@"%s %@", __FUNCTION__, launchOptions);
const CGRect bounds = [[UIScreen mainScreen] bounds];
mainWindow = [[UIWindow alloc] initWithFrame:bounds];
mainWindow.backgroundColor = [UIColor colorWithWhite:1.0 alpha:1.0];
ReaderViewController *readerViewController = [[ReaderViewController alloc] init];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:readerViewController];
mainWindow.rootViewController = navigationController;
[mainWindow makeKeyAndVisible];
return YES;
}
*/

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
//NSLog(@"%s '%@'", __FUNCTION__, url);

return NO;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
//NSLog(@"%s", __FUNCTION__);

// Sent when the application is about to move from active to inactive state. This can occur for certain types of
// temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application
// and it begins the transition to the background state. Use this method to pause ongoing tasks, disable timers,
// and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
//NSLog(@"%s", __FUNCTION__);

// Use this method to release shared resources, save user data, invalidate timers, and store enough application
// state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate:
// when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
//NSLog(@"%s", __FUNCTION__);

// Called as part of the transition from the background to the active state; here you can
// undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
//NSLog(@"%s", __FUNCTION__);

// Restart any tasks that were paused (or not yet started) while the application was inactive.
// If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application
{
//NSLog(@"%s", __FUNCTION__);

// Called when the application is about to terminate. Save data if appropriate.
// See also applicationDidEnterBackground:.
}

- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application
{
//NSLog(@"%s", __FUNCTION__);

// Free up as much memory as possible by purging cached data objects that can be
// recreated (or reloaded from disk) later.
}

- (void)applicationSignificantTimeChange:(UIApplication *)application
{
//NSLog(@"%s", __FUNCTION__);
}

@end
32 changes: 32 additions & 0 deletions Reader/Reader/ReaderAppearance.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// ReaderAppearance.h
// Reader v0.1
//
// Copyright © 2017 Julius Oklamcak. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ReaderAppearance : NSObject <NSObject>

+ (BOOL)isSmallDevice;

+ (CGFloat)statusBarHeight;

+ (CGFloat)mainToolbarHeight;

+ (NSTimeInterval)searchBeginTimer;

+ (NSTimeInterval)animationDuration;

+ (nonnull UIColor *)controlTintColor;

+ (nonnull UIColor *)toolbarTitleTextColor;

+ (nonnull UIColor *)toolbarBackgroundColor;

+ (nonnull UIColor *)toolbarSeparatorLineColor;

+ (nonnull UIColor *)lightTextColor;

@end
Loading

0 comments on commit a804e1d

Please sign in to comment.