Skip to content

mikeplatt/MJPPdfViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT CocoaPods

Synopsis

MJPPdfViewer is a simple iOS PDF viewer currently optimised to view locally stored PDF files.

Installation

MJPPdfViewer is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'MJPPdfViewer'

If you don't use CocoaPods, just include these files in your project:

MJPPdfViewer.h
MJPPdfViewer.m
MJPPdfPage.h
MJPPdfPage.m
MJPPdfView.h
MJPPdfView.m
MJPPdfTiledView.h
MJPPdfTiledView.m

Standard Features

fileName (NSString) !Required! Local file name with extension
page (NSInteger) Page to open the PDF on
margin (CGFloat - Default: 20.0) Minimum margin between view edge and page edge
showDoneButton (BOOL - Default: YES) Creates UIBarButtonItem "Done" that dismisses the viewer

Code Example

MJPPdfViewer *pdfViewer = [[MJPPdfViewer alloc] init];
pdfViewer.fileName = @"LocalPdfFile.pdf";
pdfViewer.page = 10;
pdfViewer.margin = 10.0;
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:pdfViewer];
[self presentViewController:navigationController animated:YES completion:nil];

About

iOS PDF Viewer

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors