Swiftpack.co -  techprimate/TPPDF as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
TPPDF is a simple-to-use PDF builder for iOS
.package(url: "https://github.com/techprimate/TPPDF.git", from: "2.3.5")


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

Swift iOS|macOS License
Swift Package Manager Cocoapods Carthage

Created and maintained by Philip Niedertscheider and all the amazing contributors.

FeaturesGetting StartedCommunicationUsageInstallationCreditsLicense


  • ☑ 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
  • ☑ Swift Package Manager Support
  • ☑ Tables with cell merging & automatic page breaking
  • ☑ Hyperlinks in text
  • ☑ Native progress tracking using Foundation.Progress
  • Documentation

Getting Started

Building a PDF document is very easy:

First, you create a document with a paperformat...

let document = PDFDocument(format: .a4)

...then you add your information to a container...

document.add(.contentCenter, text: "Create PDF documents easily.")

...then you render the document...

let generator = PDFGenerator(document: document)
let url  = try generator.generateURL(filename: "Example.pdf")


If you need more details, checkout Usage.



TPPDF is an Open Source side-project of techprimate. As we are currently working on multiple other projects, we only have limited time for fixing bugs and enhancing TPPDF.

That's why any issue reporting and especially Pull Requests are very welcome!

If you need professional support for your company, you can reach out to @philprimes on Twitter or on our website techprimate.com! This is mainly for custom or high-priority requests, therefore we won't publish a consulting pricing for now.

For everything else, please see Communication and this message. Thank you!

  • If you need help, use Stack Overflow. (Tag 'TPPDF') Just open up another issue, it might lead to better documentation.
  • 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.


Take a look at the Getting Started Guide or checkout the Examples (using of one of the following):

  • Clone the repository and look at the Example folders
  • Run pod try TPPDF

Apps using TPPDF

If you are using TPPDF in your app and want to be listed here, simply create a pull request or let us know on Twitter or via GitHub. We are always curious to see, who is using our project :)

Burnout Coach - by Stéphane Mégy

Burnout Coach

ChatHistory - by techprimate


Hikingbook - by Zheng-Xiang Ke


Bug Journal - by David Johnson

Bug Journal

Energy Tracker - by Stefan Nebel

Energy Tracker


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

techprimate.com twitter facebook facebook


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

We want to thank all contributors for their effort!


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


Stars: 476
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Related Packages

Release Notes

15 weeks ago

Fixed bugs:

  • Fixed PDFList not calculating available content height correctly (#267)
  • Removed PDFTable initializer size defaults (#269)

Closed issues:

  • Issue #267
  • Issue #269

Merged pull requests:

  • PR #268 (by philprime)

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API