Hi All,
I am trying to save a pdf file in SQLite. I think it will be possible by saving the pdf file as blob. And the problem starts here, how to view that file within the iPhone app now? I know it can be done using this code:-
@interface PDFViewController : UIViewController {
UIWebView *webView;
NSURL *pdfUrl;
}
@property (nonatomic, retain) IBOutlet UIWebView *webView;
@property (nonatomic, retain) NSURL *pdfUrl;
@end
@implementation PDFViewController
@synthesize webView, pdfUrl;
- (void)viewDidLoad {
[super viewDidLoad];
// Tells the webView to load pdfUrl
[webView loadRequest:[NSURLRequest requestWithURL:pdfUrl]];
}
But what should be the value of the pdfUrl
,I am confused...
And if I retrieve it from the DB it will be in a blob format(methinks) so how to convert it into a NSdata
object?
Thank You All.