Tutorial by Examples

UIGraphicsBeginPDFContextToFile(fileName, CGRectZero, nil); UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 612, 792), nil); [self drawText]; UIGraphicsEndPDFContext(); fileName is the document file where You are going to append or attach NSString* temporaryFile = @"firstI...
NSString* fileName = @"firstIOS.PDF"; NSArray *arrayPaths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES); NSString *path = [arrayPat...
UIGraphicsBeginPDFContextToFile(fileName, CGRectZero, nil); UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 600, 792), nil); UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 600, 792), nil); UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 600, 792), nil); ...
#define kPaperSizeA4 CGSizeMake(595.2,841.8) First of all implement UIPrintPageRenderer protocol @interface UIPrintPageRenderer (PDF) - (NSData*) printToPDF; @end @implementation UIPrintPageRenderer (PDF) - (NSData*) printToPDF { NSMutableData *pdfData = [NSMutableData data]; ...

Page 1 of 1