This is not what I did, but it seems you are not the first to want to do something like this.
http://www.iphonedevsdk.com/forum/iphone-sdk-development/21451-save-contents-uiwebview-pdf-file.html
The last post in this link contains code to save the UIWebView as an image, and you should be able to convert this image to a PDF file. I do not take responsibility for the code, because I did not write it, just connecting you two :)
Here is the code for simplicity:
CGSize sixzevid=CGSizeMake(1024,1100); UIGraphicsBeginImageContext(sixzevid); [webview.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); NSData *imageData = UIImagePNGRepresentation(viewImage); NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *pathFloder = [[NSString alloc] initWithString:[NSString stringWithFormat:@"%@",@"new.png"]]; NSString *defaultDBPath = [documentsDirectory stringByAppendingPathComponent:pathFloder]; [imageData writeToFile:defaultDBPath atomically:YES];
Most likely, you will need to configure this, but hopefully this will help you move in the right direction.
source share