PDFGenerator
PDFGenerator
is a simple PDF generator that generates with UIView
, UIImage
, ...etc .
Features
- Swift 5 is ready :pray:
- Multiple pages support.
- Also generate PDF with
image path
,image binary
,image ref (CGImage)
- Good memory management.
- UIScrollView support : If view is
UIScrollView
,UITableView
,UICollectionView
,UIWebView
, drawn whole content. - Outputs as binary(
Data
) or writes to Disk(in given file path) directly. - Corresponding to Error-Handling. Strange PDF has never been generated!!.
- DPI support. : Default dpi is 72.
- Password protection support.
Requirements
- iOS 9.0+
- Xcode 11+
- Swift 5.1
Installation
Carthage
- Add the following to your Cartfile:
- Then run command:
- Add the framework as described.
Details: Carthage Readme
CocoaPods
PDFGenerator is available through CocoaPods. To install
it, simply add the following line to your Podfile:
and run pod install
Usage
Generate from view(s) or image(s)
- UIView → PDF
Also PDF can generate from image(s), image path(s) same as example.
Generate from PDFPage object
- (UIVIew or UIImage) → PDF
Use PDFPage
.
Generate custom dpi PDF
Password protection
Communication
- If you found a bug, please open an issue. :bow:
- Also, if you have a feature request, please open an issue. :thumbsup:
- If you want to contribute, submit a pull request.:muscle:
License
PDFGenerator is under MIT license. See the LICENSE file for more info.