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 03-05-2010, 02:14 AM   #1 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Posts: 264
Question UIWebview for PDFs lagging

Hi

I'm loading a 50 pages 1.2 MByte PDF from the internet and saving it to the device. Then I'm loading the PDF from the device and show it inside a UIWebview.

It is lagging. When I scroll down more than 1.5 pages the page indicator (4 of 50) doesn't fade away as it should, the scroll motion stops, so no slowing down and it stays blurry. This all for about 3-6 seconds. And then it suddenly loads and everything's fine.

Same is for zooming. If I zoom, it just makes the same problems and after 5 seconds or so, it becomes clear and I can use it.

The PDF isn't large, so why is it lagging? It is only on the device, the simulator rocks perfectly.

Any suggestions? Is a Quartz PDF viewer faster? I have heard problems with the Quartz version concerning zoom...

How can I show this PDF without lag? Please help me!

Thank you very much
Kroupy is offline   Reply With Quote
Old 03-05-2010, 03:37 PM   #2 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Posts: 264
Default

bump

I really need your help.

Please, how can I show a large PDF without lagging?

Thank you!!
Kroupy is offline   Reply With Quote
Old 03-06-2010, 02:53 PM   #3 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Posts: 264
Default

cmon guys, this is crucial for me...please...
Kroupy is offline   Reply With Quote
Old 03-06-2010, 08:06 PM   #4 (permalink)
Super Moderator
 
Join Date: Oct 2009
Location: San Diego, CA
Posts: 1,578
Default

I've not done it myself, but this blog post seems to cover what you are trying to do: Cocoa for Scientists (XXX): Developing for iPhone | MacResearch
JasonR is offline   Reply With Quote
Old 03-07-2010, 04:04 AM   #5 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Posts: 264
Default

Quote:
Originally Posted by JasonR View Post
I've not done it myself, but this blog post seems to cover what you are trying to do: Cocoa for Scientists (XXX): Developing for iPhone | MacResearch
I give it a try, thank you VERY much!

Edit: I looked over it, but it seems to just load a PDF, but nothing special, it will still lag. This error appears also within Mobile Safari. There, the PDF also need about 6 seconds to load a particular page.

Last edited by Kroupy; 03-07-2010 at 04:09 AM.
Kroupy is offline   Reply With Quote
Old 03-07-2010, 01:20 PM   #6 (permalink)
Super Moderator
 
Join Date: Oct 2009
Location: San Diego, CA
Posts: 1,578
Default

If the PDF lags in Mobile Safari, you are going to have a hard time doing any better than Apple's coders. Can you open the PDF on your MAC in Preview, and save it with the "Reduce File Size" filter? It might clean it up enough to stop the lagging.
JasonR is offline   Reply With Quote
Old 03-07-2010, 01:23 PM   #7 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Posts: 264
Default

Hi

Thank you very much!

Yes it laggs also in Mobile Safari and I tried the filter but the size just increased. But I really think the Hardware is too weak...Strange though, it's 1.2MByte!! That's sooo little...I don't get it. How can I manipulate the PDF? If I use a PDF with less pages, it works a little bit better...that means it's the content that's making problems...what could it be? Pictures? Diagramms? And why is this so? I mean it's not 50MB, its 1.2MB... really strange.
Kroupy is offline   Reply With Quote
Old 03-07-2010, 01:35 PM   #8 (permalink)
Super Moderator
 
Join Date: Oct 2009
Location: San Diego, CA
Posts: 1,578
Default

I wish I could help more. If the Reduce File Size filter made the file bigger, there's something messed up about that PDF. I doubt the size is the issue, and plenty of PDF's with pictures and diagrams work fine. I would suspect there's something wrong with the program that made the PDF. IF I were in your shoes, I would try to re-create it another way. You might also try PDFShrink.
JasonR is offline   Reply With Quote
Old 03-07-2010, 01:36 PM   #9 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Posts: 264
Default

Hi

thanks.

I'm getting the PDF from a company, I can't re-create it. But I will contact them.

Thank you very much JasonR! Great help!
Kroupy is offline   Reply With Quote
Old 03-07-2010, 01:52 PM   #10 (permalink)
Obj-C Learner
 
Join Date: Apr 2009
Location: Manchester, UK
Posts: 1,030
Send a message via MSN to ZunePod Send a message via Yahoo to ZunePod
Default

That sig is so annoying.

Just one question, is Quartz any faster?
__________________
Will code for food
ZunePod is offline   Reply With Quote
Old 03-07-2010, 01:57 PM   #11 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Posts: 264
Default

Quote:
Originally Posted by ZunePod View Post
That sig is so annoying.

Just one question, is Quartz any faster?
Ignore it then.

Concerning the question. I heard yes, Quartz is faster, but Quartz has some problems:

- It kinda only loads PDFs from the MainBundle, but I need PDFs in the documents directory.
- It doesn't bounce like a Webview
- It doesn't reload after scroll, so it stays blurry

- ...
Kroupy is offline   Reply With Quote
Reply

Bookmarks

Tags
lagging, pdf, uiwebview, webview

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
» Stats
Members: 158,477
Threads: 89,092
Posts: 380,125
Top Poster: BrianSlick (7,091)
Welcome to our newest member, leticiatroutman
Powered by vBadvanced CMPS v3.1.0

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