to create a pdf programmaticallly inside my iOS app I followed this tutorial on mobile.tut+:
http://mobile.tutsplus.com/tutorials/iphone/generating-pdf-documents/
<
This is my solution to the PDF Generation issues from recent deprecated methods since IOS7 release:
- (void)drawDate
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [UIColor blackColor].CGColor);
CGRect textRect = CGRectMake(160, 120, [[self date]frame].size.width, self.date.frame.size.height);
NSString *dateString = self.date.text;
UIFont *font = [UIFont fontWithName:@"Helvetica" size:14];
NSMutableParagraphStyle *paragraphstyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy];
paragraphstyle.lineBreakMode = NSLineBreakByWordWrapping;
paragraphstyle.alignment = NSTextAlignmentLeft;
NSDictionary * attributes = @{ NSFontAttributeName:font, NSParagraphStyleAttributeName: paragraphstyle };
[dateString drawInRect:textRect withAttributes:attributes];
}
Hope this helps. LMK if you have comments...