|
@@ -137,6 +137,11 @@
|
|
|
|
|
|
|
|
if(self.isLocalfile)
|
|
if(self.isLocalfile)
|
|
|
{
|
|
{
|
|
|
|
|
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
|
|
|
|
+ NSString *cachefolder = [paths objectAtIndex:0];
|
|
|
|
|
+ NSString *pdfFolder = [cachefolder stringByAppendingPathComponent:@"pdf_cache"];
|
|
|
|
|
+ self.url = [pdfFolder stringByAppendingPathComponent:self.url];
|
|
|
|
|
+
|
|
|
self.content= [NSData dataWithContentsOfFile:self.url];
|
|
self.content= [NSData dataWithContentsOfFile:self.url];
|
|
|
[self.webView loadData:self.content MIMEType:@"application/pdf" textEncodingName:nil baseURL:nil];
|
|
[self.webView loadData:self.content MIMEType:@"application/pdf" textEncodingName:nil baseURL:nil];
|
|
|
[waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
|
|
[waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
|