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

sdkIQ for iPhone
($4.99)

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Dual Matches
($0.99)

Calcuccino Programmers' Calculator
($2.99)

SDKtoday
(free)

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, 01:14 AM   #1 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
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
__________________
Translate Your App!




Kroupy is offline   Reply With Quote
Old 03-05-2010, 02:37 PM   #2 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
Default

bump

I really need your help.

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

Thank you!!
__________________
Translate Your App!




Kroupy is offline   Reply With Quote
Old 03-06-2010, 01:53 PM   #3 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
Default

cmon guys, this is crucial for me...please...
__________________
Translate Your App!




Kroupy is offline   Reply With Quote
Old 03-06-2010, 07:06 PM   #4 (permalink)
Unemployed Developer
 
Join Date: Oct 2009
Location: Del Ma, CA
Posts: 611
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, 03:04 AM   #5 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
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.
__________________
Translate Your App!





Last edited by Kroupy; 03-07-2010 at 03:09 AM.
Kroupy is offline   Reply With Quote
Old 03-07-2010, 12:20 PM   #6 (permalink)
Unemployed Developer
 
Join Date: Oct 2009
Location: Del Ma, CA
Posts: 611
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, 12:23 PM   #7 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
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.
__________________
Translate Your App!




Kroupy is offline   Reply With Quote
Old 03-07-2010, 12:35 PM   #8 (permalink)
Unemployed Developer
 
Join Date: Oct 2009
Location: Del Ma, CA
Posts: 611
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, 12:36 PM   #9 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
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!
__________________
Translate Your App!




Kroupy is offline   Reply With Quote
Old 03-07-2010, 12:52 PM   #10 (permalink)
Obj-C Learner
 
Join Date: Apr 2009
Location: Manchester, UK
Posts: 1,028
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 online now   Reply With Quote
Old 03-07-2010, 12:57 PM   #11 (permalink)
Developer & Translator
 
Kroupy's Avatar
 
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
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

- ...
__________________
Translate Your App!




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: 41,862
Threads: 49,771
Posts: 213,058
Top Poster: BrianSlick (3,139)
Welcome to our newest member, futurevilla216
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:06 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0