I’ve mentioned a few resources showing how to created PDFs using UIKit and Quartz.
Here’s another nice library for creating PDF files from Brent Nycum called BNHtmlPdfKit.
With BNHtmlPdfKit you can easily create a PDF file by supplying an HTML string or you can supply a URL and BNHtmlPdfKit will create the PDF.
It is also possible to specify different page sizes, and margin sizes.
Here’s an example from the readme showing how easy it is to create a PDF from a URL using BNHtmlPdfKit:
BNHtmlPdfKit *_htmlPdfKit;
}
– (void) createPdf:(id)sender {
_htmlPdfKit = [[BNHtmlPdfKit alloc] init];
_htmlPdfKit.delegate = self;
[_htmlPdfKit saveUrlAsPdf:[NSURL URLWithString:@"http://itsbrent.net/index.html"]];
}
@end
You can find BNHtmlKit on Github here.
A nice PDF creation library.
- Dead Simple Library For Creating MD5, SHA1, And SHA256 Hashes From NSData and NSString Objects
- Objective-C Library For Easier String Formatting/Masking Using Regular Expressions
- iOS Library For Easy PDF Report Creation Using HTML With Template Support
- Easy To Use iOS String And UIText Validation Library (Regex Comparisons and More)
- Open Source: NSAttributedString HTML Additions For iOS
Original article: iOS Library For Easy PDF Creation From An HTML String Or URL
©2013 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.