Skip to content

Commit

Permalink
HOWTO.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vfr committed Jul 17, 2017
1 parent ff0f310 commit 013d66e
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
libpdfium.a
project.xcworkspace
xcuserdata
Todo.txt
36 changes: 36 additions & 0 deletions HOWTO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
### Using the UXReader PDF Framework for iOS

#### Getting Started

Since the framework depends on a single large binary library file (libpdfium.a), you should download
the latest [UXReader-iOS](https://github.com/vfr/UXReader-iOS/releases/download/0.1.0/UXReader-iOS.zip)
release ZIP. Once extracted, open Reader.xcworkspace in Xcode and then build and run to a device
(as the PDFium library does not support building for x86_64 simulator at this time).
Then use iTunes to sync PDF files to the sample Reader app.

Alternatively, you can clone the project from GitHub and copy libpdfium.a from the above ZIP into
the PDFium folder inside of the UXReader project folder.

To use the UXReader framework in your own apps, simply drag the UXReader project folder to your
Xcode workspace or project and set the dependencies to this iOS Framework to build and include
it in your app bundle.

#### Showing a Document

There are two classes that are required to show a document: `UXReaderDocument` and `UXReaderViewController`.
Use `#import <UXReader/UXReader.h>` to import their definitions.

First create a UXReaderDocument object:

`NSURL *URL = [NSURL fileURLWithPath:@"file:///path/to/user/file.pdf"];`
`UXReaderDocument *document = [[UXReaderDocument alloc] initWithURL:URL];`

then

`UXReaderViewController *readerViewController = [[UXReaderViewController alloc] init];`
`[readerViewController setDelegate:self]; [readerViewController setDocument:document];`
`[readerViewController setDisplayMode:UXReaderDisplayModeSinglePageScrollH];`

now present the view controller. Please see the `-openDocumentURL:` method in
[`ReaderViewController.mm`](https://github.com/vfr/UXReader-iOS/blob/master/Reader/Reader/ReaderViewController.mm)
in the Reader sample app for details on presenting as a modal or child view controller.
8 changes: 4 additions & 4 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
UXReader
UXReader PDF Framework for iOS License

Copyright © 2017 Julius Oklamcak. All rights reserved.

Expand All @@ -19,13 +19,13 @@ 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
PDFium License

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
Expand Down
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on the open-source [PDFium](https://pdfium.googlesource.com/pdfium/) library.
* 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.
* Table of Contents (aka PDF outline or bookmark) extraction.
* Page text extraction (by co-ordinates or character index).
* Page links (goto page and URL).
* Page labels ("Cover", "i", "ii", etc).
Expand All @@ -26,16 +26,14 @@ on the open-source [PDFium](https://pdfium.googlesource.com/pdfium/) library.
### Notes

The code is universal, written in Objective-C++ (works with Swift or plain
Objective-C) and does not require storyboards or 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). You will also need to download
[libpdfium.a](https://github.com/vfr/UXReader-iOS/releases/download/0.1.0/libpdfium.a)
and copy it into the PDFium directory inside the UXReader project sub-directory before
building.
Objective-C) and does not require storyboards or NIBs (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 [HOWTO](https://github.com/vfr/UXReader-iOS/blob/master/HOWTO.md) for
getting started and the sample Reader project on how to use the UXReader framework
(class and method documentation is still on the todo list).

### Contact Info

Expand Down
2 changes: 2 additions & 0 deletions UXReader/UXReader.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
451C82E41E6C2E5D00E6EB1C /* UXReaderPageToolbar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UXReaderPageToolbar.mm; path = UXReader/UXReaderPageToolbar.mm; sourceTree = "<group>"; };
451ECD641E6DC89A0038E89D /* UXReaderPageImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UXReaderPageImageView.h; path = UXReader/UXReaderPageImageView.h; sourceTree = "<group>"; };
451ECD651E6DC89A0038E89D /* UXReaderPageImageView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UXReaderPageImageView.mm; path = UXReader/UXReaderPageImageView.mm; sourceTree = "<group>"; };
4524BF981F1D5B1900E12836 /* HOWTO.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = HOWTO.md; path = ../HOWTO.md; sourceTree = "<group>"; };
452538CF1E8F59E2009D3F03 /* UXReaderThumbCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UXReaderThumbCell.h; path = UXReader/UXReaderThumbCell.h; sourceTree = "<group>"; };
452538D01E8F59E2009D3F03 /* UXReaderThumbCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UXReaderThumbCell.mm; path = UXReader/UXReaderThumbCell.mm; sourceTree = "<group>"; };
452B147D1E8AECEF00C61DEE /* UXReaderOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UXReaderOutlineView.h; path = UXReader/UXReaderOutlineView.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -277,6 +278,7 @@
453DED5E1E68E7E700DEE191 /* Miscellaneous */ = {
isa = PBXGroup;
children = (
4524BF981F1D5B1900E12836 /* HOWTO.md */,
4535734D1F1BC71F00093305 /* README.md */,
4535734B1F1BC71300093305 /* LICENSE.md */,
453DED611E68E98100DEE191 /* Todo.txt */,
Expand Down

0 comments on commit 013d66e

Please sign in to comment.