Hi in my application I have to generate PDF file. That pdf file may include Images,Description,Numbers,border lines and page numbers.Can any one please let me know how to generate pdf file in ios.

Hi in my application I have to generate PDF file. That pdf file may include Images,Description,Numbers,border lines and page numbers.Can any one please let me know how to generate pdf file in ios.

 
    
    Create your custom view to add image, tableview or anything. Points the pdf converter to the mutable data object and to the UIView to be converted to pdf.
Try this:
NSMutableData *pdfData = [NSMutableData data];
    UIGraphicsBeginPDFContextToData(pdfData,self.bounds, nil);
    UIGraphicsBeginPDFPage();
    CGContextRef pdfContext = UIGraphicsGetCurrentContext();
    // draws rect to the view and thus this is captured by UIGraphicsBeginPDFContextToData
    [self.layer renderInContext:pdfContext];
    // remove PDF rendering context
    UIGraphicsEndPDFContext();
    // Retrieves the document directories from the iOS device
    NSArray* documentDirectories = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES);
    NSString* documentDirectory = [documentDirectories objectAtIndex:0];
    NSString* documentDirectoryFilename = [documentDirectory stringByAppendingPathComponent:@"ess.pdf"];
    // instructs the mutable data object to write its context to a file on disk
    [pdfData writeToFile:documentDirectoryFilename atomically:YES];
