Latest 0.3.2
Homepage https://github.com/hons82/THPDFKit
License MIT
Platforms ios 9.0, requires ARC
Frameworks UIKit
Authors

Build Status
Pod Version
Pod Platform
Pod License
Coverage Status

PDF viewer component on top of Apples PDFKit

Screenshots

iPhone Portrait
iPhone Landscape

Installation

CocoaPods

Install with CocoaPods by adding the following to your Podfile:

platform :ios, '9.0'
use_frameworks!
pod 'THPDFKit', '~> 0.3.1'

Note: We follow http://semver.org for versioning the public API.

Usage

This is a sample initialization taken from the sample project which uses storyboards to define viewcontrollers and navigation.

However the only thing that is really needed is passing the URL to the PDF file to the Wrapper (If you wanna use the Quicklook fallback) or directly to the PDFKitViewController if you’re not targeting platforms below iOS11.

    // MARK: - Navigation

    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        if let indexPath = tableView.indexPathForSelectedRow {
            let selectedRow = indexPath.row
            let detailVC = segue.destination as! PDFViewControllerWrapper
            detailVC.url = self.samplePDFs[selectedRow]

        }
    }

TODOs

  • Finally fix the broken TravisCI integration
  • Support for annotations
  • Improve podspec for iOS11 only version without Quicklook
  • Extend customizability (colors, sizes, fonts, …)
  • Support for CocoaLumberjack (for logging)

Contributions

…are really welcome. If you have an idea just fork the library change it and if its useful for others and not affecting the functionality of the library for other users I’ll insert it

License

Source code of this project is available under the standard MIT license. Please see the license file.

Latest podspec

{
    "name": "THPDFKit",
    "version": "0.3.2",
    "summary": "PDF viewer component on top of Apples PDFKit",
    "description": "PDF viewer component on top of Apples PDFKit.nAs a fallback for older iOS versions this library is using QuickLook",
    "homepage": "https://github.com/hons82/THPDFKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "Hannes Tribus": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/hons82/THPDFKit.git",
        "tag": "0.3.2"
    },
    "source_files": "THPDFKit/THPDFKit/**/*.{swift}",
    "resources": "THPDFKit/THPDFKit/Assets.xcassets",
    "frameworks": "UIKit",
    "swift_version": "4.0"
}

Pin It on Pinterest

Share This