Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 12-25-2009, 05:03 PM   #1 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: Hawaii
Posts: 52
Default UIWebview load document

Hi all,

I have successfully loaded a pdf into a webview (see code below) -- However in an ideal world I would like to load a iWork pages document similar to this:Technical Q&A QA1630: Using UIWebView to display select document types

Code:
// Load PDF
    NSString *path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"pdf"];
    NSURL *url = [NSURL fileURLWithPath:path];
    NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:url];
    [webView loadRequest:urlRequest];
Any assistance would be greatly appreciated!

Thanks. LB
lab12 is offline   Reply With Quote
Old 12-27-2009, 07:52 PM   #2 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 27
Default

I'm also trying to do the same thing. I can get pdf files to display, but not keynote. I basically used the same code as you show above, but with "key" as the ofType (to load a keynote file out of the bundle), but I get an error that says that there was an issue loading the file. Have you had any luck?

Thanks
TinyMission is offline   Reply With Quote
Old 12-28-2009, 10:15 PM   #3 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: Hawaii
Posts: 52
Default

Hi TinyMission,

I figured out how to load the pages (based on Apple code) but it only worked on the iphone not in simulator -- and it was offset on the top and left just like the pdf. So as a workaround I used pages exported to pdf and put pdf in html then loaded html. A little longer but it seems to work for now...

Thanks,

LB
lab12 is offline   Reply With Quote
Old 02-19-2011, 07:46 PM   #4 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 2
Default Any Luck

Anybody eventually have any luck on loading the key files in the UIWebView?

If so can you share details?

I need to be able to load it without exporting it.

I can load almost any document that is in Apple's support list here: Technical Q&A QA1630: Using UIWebView to display select document types

When I try to load keynote files I get "An error occurred while reading document message"

Last edited by TetraQuark; 02-19-2011 at 07:48 PM.
TetraQuark is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 256
19 members and 237 guests
2WeeksToGo, ADY, BrianSlick, dacapo, Dani77, Dattee, Duncan C, headkaze, IphoneSdk, jemicha, kapps11, mer10, mgon987, Punkjumper, sneaky, timle8n1
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,879
Threads: 89,228
Posts: 380,743
Top Poster: BrianSlick (7,129)
Welcome to our newest member, mgon987
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:41 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0