 |
 |
|
 |
03-05-2010, 01:14 AM
|
#1 (permalink)
|
|
Developer & Translator
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
|
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!
|
|
|
03-05-2010, 02:37 PM
|
#2 (permalink)
|
|
Developer & Translator
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
|
bump
I really need your help.
Please, how can I show a large PDF without lagging?
Thank you!!
__________________
Translate Your App!
|
|
|
03-06-2010, 01:53 PM
|
#3 (permalink)
|
|
Developer & Translator
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
|
cmon guys, this is crucial for me...please...
__________________
Translate Your App!
|
|
|
03-07-2010, 03:04 AM
|
#5 (permalink)
|
|
Developer & Translator
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
|
Quote:
Originally Posted by JasonR
|
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.
|
|
|
03-07-2010, 12:20 PM
|
#6 (permalink)
|
|
Unemployed Developer
Join Date: Oct 2009
Location: Del Ma, CA
Posts: 611
|
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.
|
|
|
03-07-2010, 12:23 PM
|
#7 (permalink)
|
|
Developer & Translator
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
|
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!
|
|
|
03-07-2010, 12:35 PM
|
#8 (permalink)
|
|
Unemployed Developer
Join Date: Oct 2009
Location: Del Ma, CA
Posts: 611
|
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.
|
|
|
03-07-2010, 12:36 PM
|
#9 (permalink)
|
|
Developer & Translator
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
|
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!
|
|
|
03-07-2010, 12:52 PM
|
#10 (permalink)
|
|
Obj-C Learner
Join Date: Apr 2009
Location: Manchester, UK
Posts: 1,028
|
That sig is so annoying.
Just one question, is Quartz any faster?
__________________
Will code for food
|
|
|
03-07-2010, 12:57 PM
|
#11 (permalink)
|
|
Developer & Translator
Join Date: Dec 2008
Location: AppStore & Dictionary
Posts: 242
|
Quote:
Originally Posted by ZunePod
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!
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 434 |
| 40 members and 394 guests |
| AdamSubach, aderrington, anubhab123, benoitr007, BrianSlick, caseysackett, Chessin, Danneman, dev123, ErichGS, futurevilla216, Gambit, GreatWizard, gw1921, HemiMG, HowEver, iSDK, Jeremy1026, joelhull, lifeCoder45, mattiahalter, mcapraro, melodizzzy, mriphoneman, newchucky, Ovidius, Piequanna, qilin, Racker, rendezvouscp, riq, Sega dude, socals, themathminister, timle8n1, tinrocket, Whitehk, ZunePod |
| Most users ever online was 965, 06-30-2010 at 04:26 AM. |
» Stats |
Members: 41,862
Threads: 49,771
Posts: 213,058
Top Poster: BrianSlick (3,139)
|
| Welcome to our newest member, futurevilla216 |
|