How to open my device's document files programmatically. such as .doc
, .docx
, .ppt
,.pdf
etc. i want to Send selected Document files from path to server.
Can anybody please help me out of this issue by some example or code?
Thanks.
How to open my device's document files programmatically. such as .doc
, .docx
, .ppt
,.pdf
etc. i want to Send selected Document files from path to server.
Can anybody please help me out of this issue by some example or code?
Thanks.
To open office files within an iOS app you can:
1- Use UIWebView . Here is a sample code with a document included in the app's resources.
NSString *path = [[NSBundle mainBundle] pathForResource:@"document" ofType:@"ppt"];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:request];
2- You can use the QuickLook framework to preview the files "in app".
3- You can use the document interaction controller to open the files using available apps that can handle them in the device.
4- Avoid downloading and storing files without getting user permission, or at least informing users. You can even put this in your "terms and conditions". Also, be sure not to include those downloaded URL in iClowd backups.