views:

4038

answers:

3

I am loading a relatively small PDF file (140kb) using UIWebView and even though this is working fine, I'm finding it lags a lot when I scroll and zoom. The PDF is a map so there's quite a lot of text and lines on it so I'm wondering if there's any way to accelerate it somehow so everything moves smoother? Would converting to PNG work better? It is smoother but the 140kb PDF become 1.2mb after the conversion so I don't know if that's a good solution.

Any advice would be appreciated.

Thanks

+6  A: 

If you email the PDF in question to yourself, then view it as the attachment in Mail, is the performance similar?

If so, it's probably just limitations of the rendering speed of the CPU. Once you toss a lot of graphical complexity at it, the iPhone slows down dramatically.

Marco
Thanks Marco. You are correct. It's just as choppy in mail.
givp
+1  A: 

You may be able to coax more performance out of the device by using a CATiledLayer to render your PDF map. Bill Dudney has some sample code that does just this, although on the Mac. His iPhone version of the same code doesn't work with a map, but it would be trivial to transplant the routines in there to do that.

Brad Larson
A: 

Hello, I want to develop a pdf reader app. But I don't know about the format of pdf. Do you know well about how to parse pdf ??

Thanks.

la