Swiftpack.co - Package - techprimate/TPPDF

TPPDF

Swift Cocoapods Carthage iOS License

Travis Codacy codebeat codecov

TPPDF is a fast PDF builder for iOS using simple commands to create advanced documents!

What's new? FeaturesCommunicationExampleUsageInstallationCreditsLicense

Attention:

We just released version 2.0.0. It has breaking API changes and might causes issues as it is needs more testing. Please do not upgrade to it yet, unless you are willing to accept some instability.

IF YOU SEE ANY ISSUES, PLEASE REPORT THEM! Thank you!

What's new?

TPPDF 2.0 brings a lot of new features and small tweaks. Here are some of the biggest ones:

  • ☑ Swift Package Manager Support
  • ☑ Table with cell merging
  • ☑ Table cell content wraps on page breaks
  • ☑ Hyperlinks in attributed strings
  • ☑ Native progress tracking using Foundation.Progress
  • ☑ Instance-based generators, so you can generate multiple documents at the same time

Features

  • ☑ Page header and footer
  • ☑ Dynamic content layout with page alignment
  • ☑ Support for tables and cell alignment
  • ☑ Attributed strings
  • ☑ Custom spacing
  • ☑ Image support
  • ☑ Horizontal line separators
  • ☑ Custom indentation
  • ☑ Custom top offset (good for layered rendering)
  • ☑ Pagination
  • ☑ Image caption
  • ☑ Compress images
  • ☑ Custom image size fit
  • ☑ Images in the header and footer
  • ☑ Horizontal line separators in the header and footer
  • ☑ Generate PDF files directly to handle large PDF files (Details)
  • ☑ PDF metadata
  • ☑ Custom table styling
  • ☑ Multi-column sections
  • Documentation

Communication

  • If you need help, use Stack Overflow. (Tag 'TPPDF')
  • If you'd like to ask a general question, use Stack Overflow.
  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Example

To run the example project, run pod try TPPDF

Installation

Requirements

As of TPPDF 2.0 and Swift 5.2, we do not actively support older Swift versions anymore. If you still need an older Swift version, see the following table for their respective branches. Bleed development version can be found on the develop branch.

| Language | Branch | Pod version | Xcode version | iOS version | | --------- | ---------------------------------------------------------------- | ----------- | --------------------- | ----------- | | Swift 4.2 | swift-4.2 | >= 1.3.x | Xcode 10.0+ | iOS 8.3+ | | Swift 4.1 | swift-4.1 | >= 1.0.x | Xcode 9.3 | iOS 8.3+ | | Swift 3.0 | swift-3.0 | >= 0.2.x | Xcode 8 | iOS 8.0+ | | Swift 2.3 | swift-2.3 | 0.1.5 | Xcode 8, Xcode 7.3.x | iOS 8.0+ | | Swift 2.2 | swift-2.2 | 0.1.4 | Xcode 7.3.x | iOS 8.0+ |

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate TPPDF into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'TPPDF'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate TPPDF into your Xcode project using Carthage, specify it in your Cartfile:

github "techprimate/TPPDF" ~> 1.4

Run carthage update to build the framework and drag the built TPPDF.framework into your Xcode project

Swift Package Manager

Swift Package Manager is now supported for iOS. macOS support is a requested feature and work-in-progress.

Linux support is not available, as UIKit is not available on linux.

Once you have your Swift package set up, adding TPPDF as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/techprimate/TPPDF", .upToNextMajor(from: "2.0.0"))
]

Manual Installation

As Xcode project configurations are getting pretty complex, it is recommended to use a dependency manager. If you still want to add TPPDF manually, please see issue #97.

Apps using TPPDF

If you are using TPPDF in your app and want to be listed here, simply create a pull request or let me know on twitter or via github. I am always curious who is using my projects :)

ChatHistory - by techprimate

ChatHistory

Hikingbook - by Zheng-Xiang Ke

Hikingbook

Bug Journal - by David Johnson

Bug Journal

Energy Tracker - by Stefan Nebel

Energy Tracker

Credits

TPPDF is created and maintained by Philip Niedertscheider, founder of techprimate.

techprimate.com twitter facebook facebook

Contributors

Please consider backing this project by using the following GitHub Sponsor button.

We want to thank all contributors for their effort!

License

TPPDF is available under the MIT license. See the LICENSE file for more info.

Github

link
Stars: 361

Dependencies

Used By

Total: 0

Releases

2.0.1 - 2020-05-31 11:01:16

Implemented enhancements:

  • Removed JSON representation
  • Added deprecation for table.generateCells

Fixed bugs:

  • Missing page break after space which overlaps page end (#204)

Closed issues:

1.6.0 - 2020-05-19 11:51:02

Implemented enhancements:

  • Added progress reporting using iOS internal Foundation.Progress (Issue #155)
  • Added a better test example experience
  • Added support to embed external PDF document (Issue #31)
  • Added clickable URL support for images (Issue #170)
  • Added support for NSAttributedString link attributes (Issue #71)
  • Added subscript range access to PDFTable and deprecated PDFTable.setCellStyle

Fixed bugs:

  • Fixed TravisCI configuration

Closed issues:

  • #155
  • #31
  • #170
  • #71

Merged pull requests:

  • #171
  • #172
  • #174
  • #177

2.0.0 - 2020-05-19 11:50:24

Implemented enhancements:

  • Table Merging
  • Swift Package Manager Support
  • Hyperlinks in texts

Fixed bugs:

  • External document including empty pages

Closed issues:

  • #41
  • #86
  • #148
  • #178
  • #179
  • #182
  • #183
  • #184
  • #185
  • #186
  • #196
  • #197

Merged pull requests:

  • #181

1.5.4 - 2019-12-11 17:01:32

Implemented enhancements:

  • Fixed carthage support once again

1.5.3 - 2019-12-11 17:01:17

Implemented enhancements:

  • Fixed padding in groups

1.5.2 - 2019-12-11 17:00:56

Implemented enhancements:

  • Added group breaking

1.5.1 - 2019-12-11 17:00:20

Implemented enhancements:

  • Added merge/combining of multiple documents (Issue #67)

Closed issues:

  • #67

1.5.0 - 2019-12-11 16:59:51

Implemented enhancements:

  • Changed framework methods to be "more Swift(y)"
  • Added groups
  • Added dynamic shapes for group background
  • Added column with automatic wrapping (Issue #113)
  • Added document wide text styles (Issue #57)
  • Added automatic table of content based on text styles (Issue #58)

Fixed bugs:

  • Fixed line separator in header and footer (Issue #88)
  • Fixed image in footer layout calcuations (Issue #132)

Closed issues:

  • #9
  • #57
  • #58
  • #88
  • #113
  • #118
  • #127
  • #132
  • #136
  • #137
  • #138

v1.4.1 - 2019-06-06 07:49:39

Fixed bugs:

  • Carthage missing shared scheme (#135)

Closed issues:

  • #135

v1.2.1 - 2019-05-14 06:34:33

Merged pull requests:

  • PR #82 [by snoop168]

v1.2.0 - 2019-05-14 06:33:02

Implemented enhancements:

  • Added options to PDFImage, allowing more precise control about resizing and compression.
  • Improvements to internal image resizing and compression methods.

Closed issues:

  • Issue #77
  • Issue #78

v1.3.0 - 2019-05-14 06:32:45

Implemented enhancements:

  • Support for Swift 4.2

Merged pull requests:

  • PR #94 [by techprimate-phil]

v1.3.1 - 2019-05-14 06:32:11

Fixed bugs:

  • Issue #98

1.3.0 (2018-10-03)

Full Changelog

Implemented enhancements:

  • Support for Swift 4.2

Merged pull requests:

  • PR #94 [by techprimate-phil]

v1.3.2 - 2019-05-14 06:31:55

Implemented enhancements:

  • Changed accessor methods of PDFPageFormat to be publicly accessible.
  • Added public accessor method to PDFPageLayout

Closed issues:

  • Issue #11
  • Issue #111

Merged pull requests:

  • PR #106 [by protspace]

v1.3.3 - 2019-05-14 06:31:14

Implemented enhancements:

  • Changed accessibility of PDFGenerator

Closed issues:

  • #101
  • #103
  • #108
  • #109
  • #111
  • #113
  • #114

v1.4.0 - 2019-05-14 06:30:47

Implemented enhancements:

  • Added rounded corner clipping to images (#123)
  • Added Swift 5 support

Fixed bugs:

  • Line separator skewed (#128)

Closed issues:

  • #123
  • #125
  • #128