Skip to content

ArkadiYoskovitz/iOS-PDF-Reader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iOS-PDF-Reader

PDF Reader for iOS written in Swift

Example

First use. Case when pdf has been just downloaded.

var tempPath = NSBundle.mainBundle().pathForResource("mongodb", ofType: "pdf")
PDFDocument.createPDFDocument("mongodb.pdf", password: "", tempPath: tempPath!, deleteOriginalFile: false,completionHandler: { (success, pdfDocument) -> Void in
            //once processing is done, a callback is called to perform potential UI updates
            var rootViewController = PDFViewController(document: pdfDocument)
            self.window?.rootViewController = rootViewController
          })

Second and subsequent uses

var pdfDoc = PDFDocument.getPDFDocument("mongodb.pdf",password: "")
var rootViewController = PDFViewController(document: pdfDoc)

TODO

  • Handling PDFs with password
  • ThumbView at the page bottom
  • Displaying two pages in landscape orientation

Acknowledgements

inspired by PDF Reader https://github.com/vfr/Reader and Apple's example on TiledScrollView

Bitdeli Badge

About

PDF Reader for iOS written in Swift

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Swift 100.0%