This framework aims to provide an easy way to render a given custom UIView into PDF context without the need to be aware of the original view's implementation. It can be integrated in iOS applications starting with iOS 8, in both Objective-C and the SWIFT programming languages.
With the ability to easily scale the size of the view to be rendered and adjust the font size proportionally if configured so, the framework will provide an "on the shelf" solution to generate a .PDF file directly from the device at a high-quality level. If you preview the .PDF file and zoom in, the text, backgrounds, borders and (vectorial) images have the same quality as the actual size.
THE VALUE OF PDF Exporter
This framework allows in a simple way to automate printing with high-quality content from an iOS application. If necessary, for custom views, the drawing can be extended to be printer friendly. It allows users to define custom page layout, including different paper types (US, UK, ISO), headers and footers.
The library extends the UIPrintPageRenderer class, using its interface to create custom page layout and then starts drawing it. For each page it filters the subviews to be printed, thus optimizing the runtime, and results in an object that holds the content of a PDF file. To draw the UI elements we use the native frameworks provided by iOS: CoreGraphics and QuartzCore.
You can find the complete source code and a demo project under our 3PillarLabs GitHub account: https://github.com/3pillarlabs/ios-PDFexporter
We also created a short video that will show you step-by-step how to easily integrate the framework in your iOS application.