objective c - View/API for rendering office documents doc,docx, ppt, pptx, xls, xlsx in cocoa application (Mac OSX) -


currently developing cocoa application viewing office documents inside our application. "intention behind load documents in-memory , within our app only".

in ios application, able render such files using standard uiwebview class provided uikit framework. hence tried same approach webview class in mac osx application. however, doesn’t work me.

sample code used render files below –

nsurl *url = [nsurl urlwithstring: filepath]; nsstring *mimetype = “mime type of document”; nsdata *filedata = [nsdata datawithcontentsoffile: filepath]; [[webview.mainframe] loaddata: filedata mimetype: mimetype textencodingname: @”utf-16” baseurl: url]; 

it displays raw data on screen , not proper view.

also tried approach - qlpreviewpanel. displays above formats, there no support passing nsdata input. provides options sharing , open document in third party apps. don't require these options , don't allow document open in third party apps.

suggest me better approach this.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -