tags:

views:

67

answers:

1

Hi All Using CGPDFDocument class we can read pdf document, get number of pages, get a page by number. Is there any other library that helps us reading word documents like microsoft word doc where we can get number of pages and get a page by its number etc? Do not want to use safari to view the document. I have seen some apps on app store that claims to read MS Office docs like docx, xlsx etc. Does there exists any library [even static] that we can make use of? Any idea? Thanks

Arnieterm

A: 

Loading a local PDF file into the web view

  • (void)viewDidLoad { [super viewDidLoad];

    NSString *thePath = [[NSBundle mainBundle] pathForResource:@"iPhone_User_Guide" ofType:@"doc"]; if (thePath) { NSData *pdfData = [NSData dataWithContentsOfFile:thePath]; [(UIWebView *)self.view loadData:pdfData MIMEType:@"application/doc" textEncodingName:@"utf-8" baseURL:nil]; } }

and if through network then

[self.myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com/iphone_user_guide.pdf"]]];

Sajid_Hussain