Open PowerPoint in Iphone / Ipad and show it in my application

I am trying to write an application that can display MS Word documents, MS PowerPoint presentations (ppt). Is there any support for these formats. I know that a mail application can open PowerPoint. If there is no support, what approach should I take? Thanks in advance.

+2
source share
3 answers

To open anything (PDF, Pages, Word, Numbers, Excel, Images, etc.) that Mail.app or Safari can open, UIWebView is usually used.

 UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0.0F, 0.0F, 320.0F, 480.0F)]; NSURL *pdfURL = [NSURL URLWithString:@"http://www.something.com/myFile.pdf"]; NSURLRequest *request = [NSURLRequest requestWithURL:pdfURL]; [webView loadRequest:request]; [self.view addSubview:webView]; [webView release]; 

Further information here: http://developer.apple.com/iphone/library/qa/qa2008/qa1630.html

iPhone 2.2.1 supports:

 * Excel (.xls) * Keynote (.key.zip) * Numbers (.numbers.zip) * Pages (.pages.zip) * PDF (.pdf) * Powerpoint (.ppt) * Word (.doc) 

iPhone 3.0 (the minimum version required to enter the App Store today?) adds support for:

 * Rich Text Format (.rtf) * Rich Text Format Directory (.rtfd.zip) * Keynote '09 (.key) * Numbers '09 (.numbers) Pages '09 (.pages) 
+2
source

It is relatively easy. UIWebView is capable of loading office documents.

All you have to do is get the URL of your file (it can be anywhere - application package, document directory, internet, etc.), and UIWebView loads it with -loadRequest

+1
source

You can use UIWebView to display documents.

Or there are two ways to preview documents: one is to use the UIDocumentInteractionController preview API, and the other directly using QLPreviewController.

Check out this link from Apple for more details and source code.

https://developer.apple.com/library/ios/samplecode/DocInteraction/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010052-Intro-DontLinkElementID_2

+1
source

Source: https://habr.com/ru/post/900596/


All Articles