Swiftpack.co -  nashysolutions/Leaf as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
nashysolutions/Leaf
Converts xib files to PDF pages. This repository is no longer maintained.
.package(url: "https://github.com/nashysolutions/Leaf.git", from: "1.1.0")

Leaf

Produces a PDF document from a collection of UIView instances.

func save(to url: URL) {
    let pages: [UIView] = makePages()
    PDFGenerator.generate(pages: pages, saveTo: url)
}
  • Any label with multiline text should have its lineBreakMode property set to .wordWrap.
  • To draw a simple view of any shape, you must give it a background color and a tag value of 1.
    • You do not need to set the tag value for UILabel or UIImageView.
    • Avoid using system colours (dark mode).
    • The root view does not need a tag value of 1 (unless you want something other than white).

A demo is available here.

UI PDF

GitHub

link
Stars: 0
Last commit: 4 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.

Release Notes

Initial Release
5 weeks ago

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